Examples of WSDLWriter


Examples of javax.wsdl.xml.WSDLWriter

        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>();
            ns.put("wsdl", WSDLConstants.NS_WSDL11);
            ns.put("wsu",
                   "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

        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>();
            ns.put("wsdl", WSDLConstants.NS_WSDL11);
            ns.put("wsu",
                   "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

        destination.invoke(request, response);
    }
   

    public void getWsdl(Request request, Response response) throws Exception {
        WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();

        EndpointInfo ei = this.destination.getEndpointInfo();

        Definition def = new ServiceWSDLBuilder(ei.getService()).build();

        /* FIXME: this doesn't quite work yet
        Port port = def.getService(ei.getService().getName()).getPort(ei.getName().getLocalPart());
        List<?> exts = port.getExtensibilityElements();
        if (exts.size() > 0) {
            ExtensibilityElement el = (ExtensibilityElement)exts.get(0);
            if (SOAPBindingUtil.isSOAPAddress(el)) {
                SoapAddress add = SOAPBindingUtil.getSoapAddress(el);
                add.setLocationURI(request.getURI().toString());
            }
            if (el instanceof AddressType) {
                AddressType add = (AddressType)el;
                add.setLocation(request.getURI().toString());
            }
        }
        */

        wsdlWriter.writeWSDL(def, response.getOutputStream());
    }
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

                        String publishingUrl =
                            String.valueOf(endpointInfo.getProperty("publishedEndpointUrl"));
                        updatePublishedEndpointUrl(publishingUrl, def, endpointInfo.getName());
                    }
       
                    WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
                        .getWSDLFactory().newWSDLWriter();
                    def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
                    doc = wsdlWriter.getDocument(def);
                }
            } else {
                SchemaReference si = smp.get(xsd);
                if (si == null) {
                    String xsd2 = resolveWithCatalogs(OASISCatalogManager.getCatalogManager(bus),
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

                        String publishingUrl =
                            String.valueOf(endpointInfo.getProperty("publishedEndpointUrl"));
                        updatePublishedEndpointUrl(publishingUrl, def, endpointInfo.getName());
                    }
       
                    WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
                        .getWSDLFactory().newWSDLWriter();
                    def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
                    doc = wsdlWriter.getDocument(def);
                }
            } else {
                SchemaReference si = smp.get(xsd);
                if (si == null) {
                    String xsd2 = resolveWithCatalogs(OASISCatalogManager.getCatalogManager(bus),
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

        if (definition == null) {
            System.out.println("-->No generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName());
        } else {
            try {
                System.out.println("-->Generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName());
                WSDLWriter writer =  WSDLFactory.newInstance().newWSDLWriter();
                writer.writeWSDL(definition, System.out);
            } catch (WSDLException e) {
                // ignore
            }
        }
    }
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

        }
    }
   
    protected static void writeWSDL(Definition definition) {
        try {
            WSDLWriter writer =  WSDLFactory.newInstance().newWSDLWriter();
            writer.writeWSDL(definition, System.out);
        } catch (WSDLException e) {
            // ignore
        }
    }
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

            if (wsdl.equals("")) {
                WSDLUtils.updateLocations(def, base);
            }
           
            WSDLFactory factory = WSDLFactory.newInstance();
            WSDLWriter writer = factory.newWSDLWriter();

            rootElement = writer.getDocument(def).getDocumentElement();
        } else {
            SchemaReference si = smp.get(xsd);
           
            if (si == null) {
                throw new FileNotFoundException("Schema not found: " + xsd);
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

                    } else {
                        log.info("calling updateServices ["+ qName + "][" + portName +"]");                       
                        updateServices(qName, portName, wsdlDefinition, request);
                    }
                    WSDLFactory factory = WSDLFactory.newInstance();
                    WSDLWriter writer = factory.newWSDLWriter();                   
                    writer.writeWSDL(wsdlDefinition, response.getOutputStream());
                    return;
                }
            }else {
                service.printWSDL(response.getOutputStream());
                return;
View Full Code Here

Examples of javax.wsdl.xml.WSDLWriter

            }
        }
    }

    public void getWsdl(Request request, Response response) throws Exception {
        WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();

        EndpointInfo ei = this.destination.getEndpointInfo();

        Definition def = new ServiceWSDLBuilder(ei.getService()).build();
       
        QName serviceName = ei.getService().getName();
        String portName = ei.getName().getLocalPart();
       
        updateServices(serviceName, portName, def, request);
       
        wsdlWriter.writeWSDL(def, response.getOutputStream());
    }
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.