Package javax.wsdl.xml

Examples of javax.wsdl.xml.WSDLReader


                if (wsdl == null) {
                    throw new DeploymentException("wsdl property must be set");
                }
                description = DomUtil.parse(wsdl.getInputStream());
                WSDLFactory wsdlFactory = WSDLFactory.newInstance();
                WSDLReader reader = wsdlFactory.newWSDLReader();
                reader.setFeature(Constants.FEATURE_VERBOSE, false);
                definition = reader.readWSDL(wsdl.getURL().toString(),
                        description);
                WSDLServiceFactory factory = new WSDLServiceFactory(getBus(),
                        definition, service);
                Service cxfService = factory.create();
               
View Full Code Here


                    + ") does not match the service name defined in the endpoint spec (" + interfaceName
                    + "). WSDL description may be unusable.");
        }

        // Parse the WSDL
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        reader.setFeature(Constants.FEATURE_VERBOSE, false);
        definition = reader.readWSDL(null, description);

        javax.wsdl.Service svc = definition.getService(serviceName);
        if (svc != null && svc.getPorts().values().size() == 1) {
            Port port = (Port) svc.getPorts().values().iterator().next();
            // Check if this is the same as defined in endpoint spec
View Full Code Here

    }
   
    protected Definition loadDefinition() throws IOException, WSDLException {
        if (wsdlResource != null) {
            URL resource = wsdlResource.getURL();
            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            reader.setFeature(Constants.FEATURE_VERBOSE, false);
            return reader.readWSDL(null, resource.toString());
        }
        return null;
    }
View Full Code Here

            }
            Document doc = descriptions.get(interfaceName);
            if (doc == null) {
                if (flattener == null) {
                    URL resource = getClass().getClassLoader().getResource("org/apache/servicemix/wsn/wsn.wsdl");
                    WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
                    reader.setFeature(Constants.FEATURE_VERBOSE, false);
                    Definition definition = reader.readWSDL(null, resource.toString());
                    flattener = new WSDLFlattener(definition);
                }
                Definition flatDef = flattener.getDefinition(interfaceName);
                doc = WSDLFactory.newInstance().newWSDLWriter().getDocument(flatDef);
                descriptions.put(interfaceName, doc);
View Full Code Here

    }
   
    protected Definition getDefinitionFromDescription() {
        if (description != null) {
            try {
                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
                reader.setFeature(Constants.FEATURE_VERBOSE, false);
                return reader.readWSDL(null, description);
            } catch (WSDLException ignore) {
                // Ignore
            }
        }
        return null;
View Full Code Here

    protected Definition getDefinitionFromWsdlResource() {
        if (wsdlResource != null) {
            try {
                URL resource = wsdlResource.getURL();
                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
                reader.setFeature(Constants.FEATURE_VERBOSE, false);
                return reader.readWSDL(null, resource.toString());
            } catch (Throwable ignore) {
                // Ignore
            }
        }
        return null;
View Full Code Here

       
    protected Definition getDefinitionFromWsdlExchangeTarget() {
        if (wsdlExchangeTarget != null) {
            try {
                Document description = getDescriptionForExchangeTarget(wsdlExchangeTarget);
                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
                reader.setFeature(Constants.FEATURE_VERBOSE, false);
                return reader.readWSDL(null, description);
            } catch (Throwable ignore) {
                // Ignore
            }
        }
        return null;
View Full Code Here

                if (wsdl == null) {
                    throw new DeploymentException("wsdl property must be set");
                }
                description = DomUtil.parse(wsdl.getInputStream());
                WSDLFactory wsdlFactory = WSDLFactory.newInstance();
                WSDLReader reader = wsdlFactory.newWSDLReader();
                reader.setFeature(Constants.FEATURE_VERBOSE, false);
                definition = reader.readWSDL(wsdl.getURL().toString(),
                        description);
            }
            if (service == null) {
                // looking for the servicename according to targetServiceName
                // first
View Full Code Here

        assertEquals(HttpServletResponse.SC_OK, state);
        Document doc = (Document) new SourceTransformer().toDOMNode(new StringSource(get.getResponseBodyAsString()));

        // Test WSDL
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition def;
        def = reader.readWSDL("http://localhost:8192/Service/?wsdl", doc);

        StringWriter writer = new StringWriter();
        factory.newWSDLWriter().writeWSDL(def, writer);
        log.info(writer.toString());
        Binding b = (Binding) def.getBindings().values().iterator().next();
View Full Code Here

    public static final String WSDL1_USE_LITERAL = "literal";
   
    private static WSDLFactory wsdl11Factory;
   
    public static WSDLReader createWSDL11Reader() {
        WSDLReader reader = getWSDL11Factory().newWSDLReader();
        reader.setFeature(Constants.FEATURE_VERBOSE, false);
        return reader;
    }
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.