Package org.apache.cxf.wsdl11

Examples of org.apache.cxf.wsdl11.ServiceWSDLBuilder


        Endpoint endpoint = server.getEndpoint();
        ServiceInfo service = endpoint.getEndpointInfo().getService();
        assertNotNull(service);

        Bus bus = factory.getBus();
        Definition def = new ServiceWSDLBuilder(bus, service).build();

        WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter();
        def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
        Document doc = wsdlWriter.getDocument(def);
View Full Code Here


        svrFactory.create();
       
        Collection<BindingInfo> bindings = service.getServiceInfos().get(0).getBindings();
        assertEquals(1, bindings.size());
       
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0));
        return wsdlBuilder.build();
    }
View Full Code Here

     * @throws WSDLException
     */
    public Definition getWSDLDefinition(Server server) throws WSDLException {
        Service service = server.getEndpoint().getService();

        ServiceWSDLBuilder wsdlBuilder = new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0));
        wsdlBuilder.setUseSchemaImports(false);
        return wsdlBuilder.build();
    }
View Full Code Here

       
       
        Server s = factory.create();

        try {
            ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus,
                                                                s.getEndpoint().getService()
                                                                    .getServiceInfos());
            Definition def = builder.build();
            WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
                .getWSDLFactory().newWSDLWriter();
            def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
            Element wsdl = wsdlWriter.getDocument(def).getDocumentElement();
           
View Full Code Here

                smp = CastUtils.cast((Map)endpointInfo.getService()
                                    .getProperty(SCHEMAS_KEY));
            }
           
            if (!mp.containsKey("")) {
                Definition def = new ServiceWSDLBuilder(bus,
                                                        endpointInfo.getService()).build();

                mp.put("", def);
                updateDefinition(bus, def, mp, smp, base, endpointInfo);
            }
View Full Code Here

                smp = CastUtils.cast((Map)endpointInfo.getService()
                                    .getProperty(SCHEMAS_KEY));
            }
           
            if (!mp.containsKey("")) {
                Definition def = new ServiceWSDLBuilder(bus,
                                                        endpointInfo.getService()).build();

                mp.put("", def);
                updateDefinition(bus, def, mp, smp, base, endpointInfo);
            }
View Full Code Here

                                    .getProperty(WSDLQueryHandler.class.getName()
                                                 + ".Schemas"));
            }
           
            if (!mp.containsKey("")) {
                Definition def = new ServiceWSDLBuilder(bus, endpointInfo.getService()).build();

                mp.put("", def);
                updateDefinition(def, mp, smp, base, endpointInfo);
            }
           
View Full Code Here

                                    .getProperty(WSDLQueryHandler.class.getName()
                                                 + ".Schemas"));
            }
           
            if (!mp.containsKey("")) {
                Definition def = new ServiceWSDLBuilder(bus, endpointInfo.getService()).build();

                mp.put("", def);
                updateDefinition(def, mp, smp, base, endpointInfo);
            }
           
View Full Code Here

       
        setService(endpoint.getServer().getEndpoint().getService().getName());
        setEndpoint(endpoint.getServer().getEndpoint().getEndpointInfo()
                .getName().getLocalPart());
        try {
            definition = new ServiceWSDLBuilder(getBus(), endpoint.getServer()
                    .getEndpoint().getService().getServiceInfos().iterator()
                    .next()).build();
            description = WSDLFactory.newInstance().newWSDLWriter().getDocument(definition);
        } catch (WSDLException e) {
            throw new DeploymentException(e);
View Full Code Here

                serInfo = ei.getService();
                List<ServiceInfo> serviceInfos = new ArrayList<ServiceInfo>();
                serviceInfos.add(serInfo);
                //transform import xsd to inline xsd
                ServiceWSDLBuilder swBuilder = new ServiceWSDLBuilder(getBus(),
                        serviceInfos);
                for (String key : schemaList.keySet()) {
                    Element ele = schemaList.get(key);
                    for (SchemaInfo sInfo : serInfo.getSchemas()) {
                        Node nl = sInfo.getElement().getElementsByTagNameNS(
                                "http://www.w3.org/2001/XMLSchema", "import")
                                .item(0);
                        if (sInfo.getNamespaceURI() == null // it's import
                                                            // schema
                                && nl != null
                                && ((Element) nl)
                                        .getAttribute("namespace")
                                        .equals(
                                                ele
                                                        .getAttribute("targetNamespace"))) {

                            sInfo.setElement(ele);
                        }
                    }
                }
               
                serInfo.setProperty(WSDLServiceBuilder.WSDL_DEFINITION, null);
                description = WSDLFactory.newInstance().newWSDLWriter()
                        .getDocument(swBuilder.build());

                if (endpoint == null) {
                    endpoint = ei.getName().getLocalPart();
                }
                ei.getBinding().setProperty(
View Full Code Here

TOP

Related Classes of org.apache.cxf.wsdl11.ServiceWSDLBuilder

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.