Package org.apache.cxf.wsdl11

Examples of org.apache.cxf.wsdl11.ServiceWSDLBuilder


        Definition def = null;
        try {
            Writer os = FileWriterUtil.getWriter(file);
            WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();

            ServiceWSDLBuilder builder = new ServiceWSDLBuilder(getBus(), getServiceModel());
            builder.setUseSchemaImports(this.allowImports());

            String name = file.getName();
            if (name.endsWith(".wsdl")) {
                name = name.substring(0, name.lastIndexOf(".wsdl"));
            }
            builder.setBaseFileName(name);
            Map<String, SchemaInfo> imports = new HashMap<String, SchemaInfo>();
            def = builder.build(imports);
            wsdlWriter.writeWSDL(def, os);
            os.close();

            if (def.getImports().size() > 0) {
                for (Import wsdlImport : WSDLDefinitionBuilder.getImports(def)) {
View Full Code Here


    protected Definition getWSDLDefinition(String string) throws WSDLException {
        ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().getLocalPart().equals(string)) {
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
            }
        }
        String localString = "local://" + string;
        for (Server s : svrMan.getServers()) {
            String s2 = s.getDestination().getAddress().getAddress().getValue();
            if (localString.equals(s2)) {
                Service svc = s.getEndpoint().getService();
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
            }
        }
        return null;
       
    }
View Full Code Here

    protected Definition getWSDLDefinition(String string) throws WSDLException {
        ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().getLocalPart().equals(string)) {
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
            }
        }
        return null;

    }
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

     * @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

                                    .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

       
       
        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

       
       
        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

        f.setTransportIds(tp);

        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();

            Map<String, String> ns = new HashMap<String, String>();
View Full Code Here

        f.setTransportIds(tp);

        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();

            Map<String, String> ns = new HashMap<String, String>();
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.