Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLDescription


                  * or give a (custom) progress monitor to the generate() method, so
                  * we will be informed by Axis2 about the progress of code generation. 
                  */
                 WSDL2JavaGenerator generator = new WSDL2JavaGenerator();
                 monitor.subTask(CodegenWizardPlugin.getResourceString("generator.readingWOM"));
                 WSDLDescription wom = generator.getWOM(wsdlSelectionPage.getFileName());
                 monitor.worked(1);
                
                 Map optionsMap = generator.fillOptionMap(optionsPage.isAsyncOnlyOn(),
                                           optionsPage.isSyncOnlyOn(),
                                           optionsPage.isServerside(),
View Full Code Here



    public void generateWSDL() throws Exception {
        SchemaGenerator sg = new SchemaGenerator(classLoader, className, null, null);
        XmlSchema schema = sg.generateSchema();
        WSDLDescription wommodel = new Java2WOM(
                sg.getTypeTable(), sg.getMethods(), schema, simpleClassName(className), null, null).generateWOM();
        WOMWriter womWriter = WOMWriterFactory.createWriter(org.apache.wsdl.WSDLConstants.WSDL_1_1);
        womWriter.setdefaultWSDLPrefix("wsdl");
        womWriter.writeWOM(wommodel, out);
View Full Code Here

        StringWriter writer = new StringWriter();
        schema.write(writer);
        writer.flush();
        Document doc = domBuilder.parse(new ByteArrayInputStream(writer.toString().getBytes()));
        Element documentElement = doc.getDocumentElement();
        WSDLDescription womDescription;
        WSDLComponentFactory wsdlComponentFactory = new WSDLDescriptionImpl();
        womDescription = wsdlComponentFactory.createDescription();
        HashMap namspaceMap = new HashMap();
        namspaceMap.put("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
        namspaceMap.put(targetNamespecheprefix, targentNamespece);
        namspaceMap.put("ns1", "http://org.apache.axis2/xsd");
        namspaceMap.put("xs", "http://www.w3.org/2001/XMLSchema");
        womDescription.setNamespaces(namspaceMap);
        womDescription.setTargetNameSpace(targentNamespece);

        //generating port type
        WSDLInterface portType = generatePortType(womDescription, wsdlComponentFactory, documentElement);
        womDescription.addInterface(portType);

        QName bindingName = new QName(targentNamespece, serviceName + "Binding"
                , targetNamespecheprefix);
        //generating binding
        WSDLBinding binding = generateBinding(wsdlComponentFactory,
                portType,
                bindingName,
                "document", "literal", "http://schemas.xmlsoap.org/soap/http",
                "http://www.org.apache.axis2");
        womDescription.addBinding(binding);

        //generating service
        WSDLService service = generateService(wsdlComponentFactory, womDescription, binding, serviceName);
        womDescription.addService(service);
        return womDescription;
    }
View Full Code Here

    public WSDLVersionWrapper build(InputStream in,
                                    WSDLComponentFactory wsdlComponentFactory) throws WSDLException {
        if(null == wsdlComponentFactory){
            wsdlComponentFactory = new WSDLDescriptionImpl();
        }
        WSDLDescription wsdlDescription = wsdlComponentFactory.createDescription();

        Definition wsdl1Definition = this.readInTheWSDLFile(in);
        WSDLPump pump = new WSDLPump(wsdlDescription, wsdl1Definition);
        pump.pump();
View Full Code Here

    public WSDLVersionWrapper build(String uri,
                                    WSDLComponentFactory wsdlComponentFactory) throws WSDLException {
        if(null == wsdlComponentFactory){
            wsdlComponentFactory = new WSDLDescriptionImpl();
        }
        WSDLDescription wsdlDescription = wsdlComponentFactory.createDescription();

        Definition wsdl1Definition = this.readInTheWSDLFile(uri);
        WSDLPump pump = new WSDLPump(wsdlDescription,
                wsdl1Definition,
                wsdlComponentFactory);
View Full Code Here

     */
    public void generateWSDL() throws Exception {
        SchemaGenerator sg = new SchemaGenerator(classLoader, className,
                schemaTargetNamespace, schemaTargetNamespacePrefix);
        XmlSchema schema = sg.generateSchema();
        WSDLDescription wommodel = new Java2WOMBuilder(
                sg.getTypeTable(),
                sg.getMethods(),
                schema,
                serviceName==null?simpleClassName(className):serviceName,
                targetNamespace,
View Full Code Here

        writeSchema(writer);

        Document doc = domBuilder.parse(new ByteArrayInputStream(writer.toString().getBytes()));
        Element documentElement = doc.getDocumentElement();
        WSDLDescription womDescription;
        WSDLComponentFactory wsdlComponentFactory = new WSDLDescriptionImpl();
        womDescription = wsdlComponentFactory.createDescription();
        HashMap namspaceMap = loadNamespaces();
        womDescription.setNamespaces(namspaceMap);
        womDescription.setTargetNameSpace(targetNamespace);

        //generating port type
        WSDLInterface portType = generatePortType(womDescription, wsdlComponentFactory, documentElement);
        womDescription.addInterface(portType);

        QName bindingName = new QName(targetNamespace, serviceName + BINDING_NAME_SUFFIX
                , targetNamespacePrefix);

        //generating binding. Our bidings are strictly doc/lit, atleast for now
        WSDLBinding binding = generateBinding(wsdlComponentFactory,
                portType,
                bindingName,
                //todo these need to be constants
                "document",
                "literal",
                Constants.URI_SOAP11_HTTP,
                targetNamespace);

        womDescription.addBinding(binding);

        //generating service
        WSDLService service = generateService(wsdlComponentFactory, womDescription, binding, serviceName);
        womDescription.addService(service);
        return womDescription;
    }
View Full Code Here

    public WSDLVersionWrapper build(InputStream in,
                                    WSDLComponentFactory wsdlComponentFactory) throws WSDLException {
        if(null == wsdlComponentFactory){
            wsdlComponentFactory = new WSDLDescriptionImpl();
        }
        WSDLDescription wsdlDescription = wsdlComponentFactory.createDescription();

        Definition wsdl1Definition = this.readInTheWSDLFile(in);
        WSDLPump pump = new WSDLPump(wsdlDescription, wsdl1Definition);
        pump.pump();
View Full Code Here

    public WSDLVersionWrapper build(String uri,
                                    WSDLComponentFactory wsdlComponentFactory) throws WSDLException {
        if(null == wsdlComponentFactory){
            wsdlComponentFactory = new WSDLDescriptionImpl();
        }
        WSDLDescription wsdlDescription = wsdlComponentFactory.createDescription();

        Definition wsdl1Definition = this.readInTheWSDLFile(uri);
        WSDLPump pump = new WSDLPump(wsdlDescription,
                wsdl1Definition,
                wsdlComponentFactory);
View Full Code Here

                this,
                targetNamespace,
                targetNamespacePrefix,
                serviceURL);
        try {
            WSDLDescription desc = axisService2WOM.generateWOM();

            // populate it with policy information ..
            PolicyUtil.populatePolicy(desc, this);

            WOMWriter womWriter = WOMWriterFactory.createWriter(WSDLConstants.WSDL_1_1);
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLDescription

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.