Package javax.wsdl.xml

Examples of javax.wsdl.xml.WSDLReader


  private WSDLParser wsdlParser;

  @Override
  protected void setUp() throws Exception
  {
    WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
    Definition wsdlDefinition = wsdlReader.readWSDL(WSDL_FILE);
    wsdlParser = new WSDLParser(wsdlDefinition);
  }
View Full Code Here


      {
        if(f.getName().endsWith(".wsdl"))
        {
          try
          {
            WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
            Definition def = wsdlReader.readWSDL(f.toURL().toExternalForm());
            URL url = new WSDLParser(def).getServiceLocationURL(serviceName, portName);
            if(url!=null && (def.getTargetNamespace().equals(serviceName.getNamespaceURI())))
            {
              targetWsdlFile = f;
              log.debug("Matching "+processId + " to WSDL file "+targetWsdlFile);
View Full Code Here

        MockHttpServletResponse response = new MockHttpServletResponse();
        exporter.handleRequest(request, response);
        InputSource source = new InputSource(new ByteArrayInputStream(response.getContentAsByteArray()));
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        reader.readWSDL("", source);
    }
View Full Code Here

        };
        MockHttpServletResponse response = new MockHttpServletResponse();
        exporter.handleRequest(request, response);
        InputSource source = new InputSource(new ByteArrayInputStream(response.getContentAsByteArray()));
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL("", source);
        Service service = definition.getService(new QName(namespace, name));
        assertNotNull(service);
        assertEquals(namespace, service.getQName().getNamespaceURI());
        // The service name should be equal to th
        assertEquals(name, service.getQName().getLocalPart());
View Full Code Here

            }

            WSDLFactory wsdlFactory;
            try {
                wsdlFactory = WSDLFactory.newInstance();
                WSDLReader reader = wsdlFactory.newWSDLReader();
                reader.setFeature("javax.wsdl.verbose", false);
                WSDLExtensionRegister register = new WSDLExtensionRegister(wsdlFactory , reader);
                register.registerExtenstions();
                def = reader.readWSDL(wsdlsource.getSystemId());
            } catch (WSDLException e) {
                throw new ToolException("Can not create wsdl definition for " + wsdlsource.getSystemId());
            }
           
            WSDLElementReferenceValidator wsdlRefValiadtor = new WSDLElementReferenceValidator(def, this);
View Full Code Here

        synchronized (definitionsMap) {
            if (definitionsMap.containsKey(el)) {
                return definitionsMap.get(el);
            }
        }
        WSDLReader reader = factory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        reader.setExtensionRegistry(registry);
        Definition def = reader.readWSDL(null, el);
        synchronized (definitionsMap) {
            definitionsMap.put(el, def);
        }
        return def;
    }
View Full Code Here

            definitionsMap.put(key, wsdl);
        }
    }
   
    private Definition loadDefinition(String url) throws WSDLException {
        WSDLReader reader = factory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        reader.setExtensionRegistry(registry);
        Definition def = reader.readWSDL(url);
        synchronized (definitionsMap) {
            definitionsMap.put(url, def);
        }
        return def;
    }
View Full Code Here

        return null;
    }

    public Definition getDefinition(File wsdlFile) throws Exception {
        WSDLFactory wsdlFactory = WSDLFactory.newInstance();
        WSDLReader reader = wsdlFactory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        return reader.readWSDL(wsdlFile.toURL().toString());
    }
View Full Code Here

        try
        {
            this.serviceClient = new ServiceClient();
            this.serviceClass = serviceClass;
            this.wsdlUrl = wsdlUrl;
            final WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            if (username != null && username.trim().length() > 0)
            {
                final Authenticator authenticator = new Authenticator();
                final List<String> authorizationSchemes = new ArrayList<String>();
                authorizationSchemes.add(Authenticator.BASIC);
                authenticator.setAuthSchemes(authorizationSchemes);
                authenticator.setUsername(username);
                authenticator.setPassword(password);
                authenticator.setPreemptiveAuthentication(true);
                this.serviceClient.getOptions().setProperty(
                    HTTPConstants.AUTHENTICATE,
                    authenticator);
                synchronized (this.definitionMonitor)
                {
                    this.definition =
                        this.readProtectedWsdl(
                            reader,
                            wsdlUrl,
                            username,
                            password);
                }
            }
            else
            {
                synchronized (this.definitionMonitor)
                {
                    this.definition = reader.readWSDL(wsdlUrl);
                }
            }
            String portAddress;
            if (endpointAddress != null && endpointAddress.trim().length() > 0)
            {
View Full Code Here

        URL url = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
        assertNotNull("Could not find wsdl /wsdl/hello_world_rpc_lit.wsdl", url);
       
       
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        InputSource input = new InputSource(url.openStream());
        Definition def = reader.readWSDL(null, input);
        Port port = def.getService(new QName("http://objectweb.org/hello_world_rpclit",
                                             "SOAPServiceRPCLit1")).getPort("SoapPortRPCLit1");
        WSDLMetaDataCache wsdl = new WSDLMetaDataCache(def, port);
       
        for (Method method : cls.getDeclaredMethods()) {
View Full Code Here

TOP

Related Classes of javax.wsdl.xml.WSDLReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.