Package javax.wsdl.xml

Examples of javax.wsdl.xml.WSDLReader


        Document doc = (Document) new SourceTransformer().toDOMNode(new StringSource(get.getResponseBodyAsString()));
        get.releaseConnection();

        // Test WSDL
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition;
        definition = reader.readWSDL("http://localhost:" + portNumber + "/Service/?wsdl", doc);
        assertNotNull(definition);
        assertNotNull(definition.getImports());
        assertEquals(1, definition.getImports().size());

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here


        Document doc = (Document) new SourceTransformer().toDOMNode(new StringSource(get.getResponseBodyAsString()));
        get.releaseConnection();

        // Test WSDL
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition def;
        def = reader.readWSDL("http://localhost:8196/Service/?wsdl", doc);
        assertNotNull(def);
        assertNotNull(def.getImports());
        assertEquals(1, def.getImports().size());
    }
View Full Code Here

        assertEquals("hello", e.getTextContent());
    }
   
    protected Binding<?> getBinding(String wsdlResource) throws Exception {
        String url = getClass().getResource(wsdlResource).toString();
        WSDLReader reader = WSDLUtils.createWSDL11Reader();
        Definition def = reader.readWSDL(url);
        WSIBPValidator validator = new WSIBPValidator(def);
        if (!validator.isValid()) {
            for (String err : validator.getErrors()) {
                log.info(err);
            }
View Full Code Here

            }
            if (serviceName != null && endpointName != null) {
                this.endpoint = ep;
            }
            Document doc = context.getEndpointDescriptor(ep);
            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            reader.setFeature(Constants.FEATURE_VERBOSE, false);
            this.description = reader.readWSDL(null, doc);
        }
        return this.description;
    }
View Full Code Here

        // Analyse the WSDL that is generated from the pojo service
        Document description = orderEndpoint.getDescription();
        SourceTransformer transformer = new SourceTransformer();
        log.info(transformer.toString(description));
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        reader.setFeature(Constants.FEATURE_VERBOSE, false);
        Definition definition = reader.readWSDL(null, description);
        Map namespaces = definition.getNamespaces();

        String serviceNameSpace = orderEndpoint.getInterfaceName().getNamespaceURI();
        String modelNameSpace = "http://model.complex.test";
View Full Code Here

    private Definition loadMainWsdl(String serviceUnitRootPath) throws WSDLException {
        File[] bpels = new File(serviceUnitRootPath).listFiles(filter);
        String bpel = bpels[0].getAbsoluteFile().toURI().toString();
        String wsdl = bpel.substring(0, bpel.length() - 4) + "wsdl";
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        reader.setFeature(Constants.FEATURE_VERBOSE, false);
        reader.setExtensionRegistry(getExtentionRegistry());
        // Parse the document and include any imported WSDL documents
        return reader.readWSDL(null, wsdl);
    }
View Full Code Here

        WebResponse res = client.getResponse(req);
        assertEquals(200, res.getResponseCode());
        assertEquals("text/xml", res.getContentType());
        Document doc = StaxUtils.read(res.getInputStream());
        assertNotNull(doc);
        WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
        wsdlReader.setFeature("javax.wsdl.verbose", false);
       
       
        assertValid("//wsdl:service[@name='SOAPService']/wsdl:port[@name='SoapPort']/wsdlsoap:address[@location='"
            + "http://cxf.apache.org/publishedEndpointUrl1']", doc);
        assertValid("//wsdl:service[@name='SOAPService']/wsdl:port[@name='SoapPort1']/wsdlsoap:address[@location='"
View Full Code Here

    private static final String PORT_SUFFIX = "__SOAPHTTPPort";

    public Definition cloneDefinition(WSDLFactory factory, Definition definition) throws WSDLException {
        Element root = definition.getDocumentationElement();
        root = (Element)root.cloneNode(true);
        WSDLReader reader = factory.newWSDLReader();
        return reader.readWSDL(definition.getDocumentBaseURI(), root);
    }
View Full Code Here

            throw new RuntimeException(e);
        }

        try {

            WSDLReader reader = javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader();
            reader.setFeature("javax.wsdl.verbose", false);
            reader.setFeature("javax.wsdl.importDocuments", true);

            WSDLLocatorImpl locator = new WSDLLocatorImpl(new ByteArrayInputStream(os.toByteArray()));
            Definition definition = reader.readWSDL(locator);

            processSOAPVersion(definition, requiresSOAP12);
            processNoArgAndVoidReturnMethods(definition, javaInterface);

            return definition;
View Full Code Here

        }
        try {
            URL artifactURL = wsdlDef.getLocation().toURL();
            // Read a WSDL document
            InputStream is = artifactURL.openStream();
            WSDLReader reader = wsdl4jFactory.newWSDLReader();
            reader.setFeature("javax.wsdl.verbose", false);
            reader.setFeature("javax.wsdl.importDocuments", true);
            // FIXME: We need to decide if we should disable the import processing by WSDL4J
            // reader.setFeature("javax.wsdl.importDocuments", false);
            reader.setExtensionRegistry(wsdlExtensionRegistry);

            WSDLLocatorImpl locator = new WSDLLocatorImpl(artifactURL, is);
            Definition definition = reader.readWSDL(locator);
            wsdlDef.setDefinition(definition);

            //Read inline schemas
            readInlineSchemas(wsdlDef, definition);
        } catch (WSDLException e) {
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.