Package org.apache.woden

Examples of org.apache.woden.WSDLReader


            }
            if (!WSDL2_NAMESPACE.equals(document.getDocumentElement().getNamespaceURI())) {
                LOGGER.debug("Endpoint {} has a non WSDL2 service description", serviceEndpoint);
                return;
            }
            WSDLReader reader = new DOMWSDLReader();
            DOMWSDLSource source = (DOMWSDLSource) reader.createWSDLSource();
            source.setSource(document);
            DescriptionElement descElement = reader.readWSDL(source);
            Description desc = descElement.toComponent();
            // Check if the wsdl is only a port type
            // In these cases, only the port type is used, as the service name and endpoint name
            // are provided on the jbi endpoint
            if (desc.getInterfaces().length == 1 && desc.getServices().length == 0) {
View Full Code Here


                            .newInstance();
                    documentBuilderFactory.setNamespaceAware(true);
                    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
                    Document document = documentBuilder.parse(in);

                    WSDLReader reader = DOMWSDLFactory.newInstance().newWSDLReader();
                    // This turns on WSDL validation which is set off by default.
                    reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
                    WSDLSource wsdlSource = reader.createWSDLSource();
                    wsdlSource.setSource(document.getDocumentElement());
                    wsdlSource.setBaseURI(new URI(getBaseUri()));
                    description = reader.readWSDL(wsdlSource);
                    descriptionElement = description.toElement();
                } else {
                    throw new AxisFault("No resources found to read the wsdl");
                }
View Full Code Here

        }
    }

    private Description readInTheWSDLFile(String wsdlURI) throws WSDLException {

        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        // This turns on WSDL validation which is set off by default.
//        reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
        Description description1 = reader.readWSDL(wsdlURI);
        return description1;
    }
View Full Code Here

        super.validate();
    }

    private void validateWsdl2(HttpSoapConsumerMarshaler marshaler) throws org.apache.woden.WSDLException, IOException,
                    DeploymentException {
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        DescriptionElement descElement = reader.readWSDL(wsdl.getURL().toString());
        Description desc = descElement.toComponent();
        org.apache.woden.wsdl20.Service svc;
        if (getService() != null) {
            svc = desc.getService(getService());
            if (svc == null) {
View Full Code Here

        marshaler.setBinding(BindingFactory.createBinding(port));
    }
   
    protected void validateWsdl2(HttpSoapProviderMarshaler marshaler) throws
                                  org.apache.woden.WSDLException, IOException, DeploymentException {
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        DescriptionElement descElement = reader.readWSDL(wsdl.getURL().toString());
        Description desc = descElement.toComponent();
        org.apache.woden.wsdl20.Service svc;
        if (getService() != null) {
            svc = desc.getService(getService());
            if (svc == null) {
View Full Code Here

    }

    protected static Binding<?> getBinding(String wsdlResource) {
        try {
            String url = PersonHttpTest.class.getResource(wsdlResource).toString();
            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            DescriptionElement descElement = reader.readWSDL(url);
            Description desc = descElement.toComponent();
            Endpoint endpoint = desc.getServices()[0].getEndpoints()[0];
            Binding<?> binding = BindingFactory.createBinding(endpoint);
            assertNotNull(binding);
            return binding;
View Full Code Here

        }
        return readInTheWSDLFile(document);
    }

    private Description readInTheWSDLFile(Document document) throws WSDLException {
        WSDLReader reader = DOMWSDLFactory.newInstance().newWSDLReader();
        if (customWSDLResolver != null) {
            reader.setURIResolver(customWSDLResolver);
        }
        // This turns on WSDL validation which is set off by default.
        reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
        WSDLSource wsdlSource = reader.createWSDLSource();
        wsdlSource.setSource(document.getDocumentElement());
        String uri = getBaseUri();
        if (uri != null && !"".equals(uri)) {
            try {
                wsdlSource.setBaseURI(new URI(uri));
            } catch (URISyntaxException e) {
                File f = new File(uri);
                if(f.exists()) {
                    wsdlSource.setBaseURI(f.toURI());
                } else {
                    log.error(e.toString(), e);
                }
            }
        }
        if (log.isDebugEnabled()) {
            log.debug("Reading 2.0 WSDL with wsdl uri = " + wsdlURI);
            log.trace("  the stack at this point is: " + stackToString());
        }
        return reader.readWSDL(wsdlSource);
    }
View Full Code Here

        }
        return readInTheWSDLFile(document);
    }

    private Description readInTheWSDLFile(Document document) throws WSDLException {
        WSDLReader reader = DOMWSDLFactory.newInstance().newWSDLReader();
        if (customWSDLResolver != null) {
            reader.setURIResolver(customWSDLResolver);
        }
        // This turns on WSDL validation which is set off by default.
        reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
        WSDLSource wsdlSource = reader.createWSDLSource();
        wsdlSource.setSource(document.getDocumentElement());
        String uri = getBaseUri();
        if (uri != null && !"".equals(uri)) {
            try {
                wsdlSource.setBaseURI(new URI(uri));
            } catch (URISyntaxException e) {
                File f = new File(uri);
                if(f.exists()) {
                    wsdlSource.setBaseURI(f.toURI());
                } else {
                    log.error(e.toString(), e);
                }
            }
        }
        if (log.isDebugEnabled()) {
            log.debug("Reading 2.0 WSDL with wsdl uri = " + wsdlURI);
            log.trace("  the stack at this point is: " + stackToString());
        }
        return reader.readWSDL(wsdlSource);
    }
View Full Code Here

        return readInTheWSDLFile(document);
    }

    private Description readInTheWSDLFile(Document document) throws WSDLException {
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        if (customWSDLResolver != null) {
            reader.setURIResolver(customWSDLResolver);
        }
        // This turns on WSDL validation which is set off by default.
        reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
        WSDLSource wsdlSource = reader.createWSDLSource();
        wsdlSource.setSource(document.getDocumentElement());
        String uri = getBaseUri();
        if (uri != null && !"".equals(uri)) {
            try {
                wsdlSource.setBaseURI(new URI(uri));
            } catch (URISyntaxException e) {
                File f = new File(uri);
                if(f.exists()) {
                    wsdlSource.setBaseURI(f.toURI());
                } else {
                    log.error(e.toString(), e);
                }
            }
        }
        if (log.isDebugEnabled()) {
            log.debug("Reading 2.0 WSDL with wsdl uri = " + wsdlURI);
            log.trace("  the stack at this point is: " + stackToString());
        }
        return reader.readWSDL(wsdlSource);
    }
View Full Code Here

                if (LOG.isDebugEnabled()) {
                    LOG.debug("Endpoint " + serviceEndpoint + " has a non WSDL2 service description");
                }
                return;
            }
            WSDLReader reader = new DOMWSDLReader();
            DOMWSDLSource source = (DOMWSDLSource) reader.createWSDLSource();
            source.setSource(document);
            DescriptionElement descElement = reader.readWSDL(source);
            Description desc = descElement.toComponent();
            // Check if the wsdl is only a port type
            // In these cases, only the port type is used, as the service name and endpoint name
            // are provided on the jbi endpoint
            if (desc.getInterfaces().length == 1 && desc.getServices().length == 0) {
View Full Code Here

TOP

Related Classes of org.apache.woden.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.