Examples of WSDLFactory


Examples of javax.wsdl.factory.WSDLFactory

                            if (serviceName.getLocalPart().contains(existPortName)) {
                                portType = portTypes.get(existPortQName);
                                break;
                            }
                        }
                        WSDLFactory factory = WSDLFactory.newInstance();
                        ExtensionRegistry extReg = factory.newPopulatedExtensionRegistry();
                        Binding binding = PartialWSDLProcessor.doAppendBinding(definition,
                                                                               existPortName, portType, extReg);
                        definition.addBinding(binding);
                        wsdlService = PartialWSDLProcessor.doAppendService(definition,
                                                                           existPortName, extReg, binding);
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

        }
        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.toURI().toURL().toString());
    }
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

        WSDLReader reader;
        try {
            reader = (WSDLReader)AccessController.doPrivileged(
                    new PrivilegedExceptionAction() {
                        public Object run() throws WSDLException {
                            WSDLFactory factory = WSDLFactory.newInstance();
                            return factory.newWSDLReader();
                        }
                    });
        } catch (PrivilegedActionException e) {
            throw (WSDLException)e.getException();
        }
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

        }
        Definition def = wsdlDefinition.getDefinition();
        if (wsdlDefinition.getBinding() == null) {
            // The WSDL document was provided by the user.  Generate a new
            // WSDL document with imports from the user-provided document.
            WSDLFactory factory = null;
            try {
                factory = WSDLFactory.newInstance();
            } catch (WSDLException e) {
                throw new WSDLGenerationException(e);
            }
            Definition newDef = factory.newDefinition();

            // Construct a target namespace from the base URI of the user's
            // WSDL document (is this what we should be using?) and a path
            // computed according to the SCA Web Service binding spec.
            String nsName = component.getName() + "/" + contractName;
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

    public void init() throws Exception {
        Assert.notNull(wsdl, "soap.wsdl parameter must be set on the uri");
        if (serviceName == null) {
            description = DOMUtils.readXml(wsdl.getInputStream());
            WSDLFactory wsdlFactory = WSDLFactory.newInstance();
            WSDLReader reader = wsdlFactory.newWSDLReader();
            reader.setFeature("javax.wsdl.verbose", false);
            definition = reader.readWSDL(wsdl.getURL().toString(), description);
            serviceName = (QName) definition.getServices().keySet().iterator().next();
        }
    }
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

            if (definition == null) {
                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);
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

            if (definition == null) {
                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) {
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

        int state = new HttpClient().executeMethod(get);
        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();
        BindingOperation bop = (BindingOperation) b.getBindingOperations().iterator().next();
        assertEquals(1, bop.getExtensibilityElements().size());
        ExtensibilityElement ee = (ExtensibilityElement) bop.getExtensibilityElements().iterator().next();
View Full Code Here

Examples of javax.wsdl.factory.WSDLFactory

        assertEquals(HttpServletResponse.SC_OK, state);
        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());
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory

        staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        WebServiceBindingFactory wsFactory = new DefaultWebServiceBindingFactory();
        factories.addFactory(wsFactory);
        WSDLFactory wsdlFactory = new DefaultWSDLFactory();
        factories.addFactory(wsdlFactory);
       
        WebServiceBindingProcessor wsdlProcessor = new WebServiceBindingProcessor(factories);
        staxProcessors.addArtifactProcessor(wsdlProcessor);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.