Package javax.wsdl.xml

Examples of javax.wsdl.xml.WSDLWriter.writeWSDL()


        } catch (java.io.FileNotFoundException e) {
            throw new ToolException(e.getMessage(), e);
        }

        try {
            writer.writeWSDL(this.definition, outstream);
        } catch (javax.wsdl.WSDLException e) {
            throw new ToolException(e.getMessage(), e);
        }
        return true;
    }
View Full Code Here


        WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
        Writer outputWriter = getOutputWriter();

        try {
            wsdlWriter.writeWSDL(wsdlDefinition, outputWriter);
        } catch (WSDLException wse) {
            Message msg = new Message("FAIL_TO_WRITE_WSDL", LOG);
            throw new ToolException(msg, wse);
        }
        try {
View Full Code Here

        wsdlDefinition.addBinding(binding);

        WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
        Writer outputWriter = getOutputWriter(NEW_FILE_NAME_MODIFIER);
        try {
            wsdlWriter.writeWSDL(wsdlDefinition, outputWriter);
        } catch (WSDLException wse) {
            Message msg = new Message("FAIL_TO_WRITE_WSDL", LOG);
            throw new ToolException(msg);

        }
View Full Code Here

        wsdlDefinition.addService(service);

        WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
        Writer outputWriter = getOutputWriter(NEW_FILE_NAME_MODIFIER);
        try {
            wsdlWriter.writeWSDL(wsdlDefinition, outputWriter);
        } catch (WSDLException wse) {
            Message msg = new Message("FAIl_TO_WRITE_WSDL", LOG);
            throw new ToolException(msg, wse);
        }
        try {
View Full Code Here

    private void writeToWSDL() throws ToolException {
        WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
        Writer outputWriter = getOutputWriter(NEW_FILE_NAME_MODIFIER);
        try {
            wsdlWriter.writeWSDL(wsdlDefinition, outputWriter);
        } catch (WSDLException wse) {
            Message msg = new Message("FAIL_TO_WRITE_WSDL", LOG);
            throw new ToolException(msg);
        }
        try {
View Full Code Here

    public static void writeWSDL(Definition def, Writer outputWriter)
        throws WSDLException, IOException {    
        WSDLCorbaFactory wsdlfactory = WSDLCorbaFactory
            .newInstance("org.apache.yoko.tools.common.WSDLCorbaFactoryImpl");
        WSDLWriter writer = wsdlfactory.newWSDLWriter();       
        writer.writeWSDL(def, outputWriter);
       
        outputWriter.flush();
        outputWriter.close();
    }
View Full Code Here

                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)) {
                    Definition wsdlDef = wsdlImport.getDefinition();
View Full Code Here

                        wsdlFile = new File(outputdir, wsdlDef.getQName().getLocalPart() + ".wsdl");
                    }
                    OutputStream wsdlOs = null;
                    try {
                        wsdlOs = new BufferedOutputStream(new FileOutputStream(wsdlFile));
                        wsdlWriter.writeWSDL(wsdlDef, wsdlOs);
                    } finally {
                        if (wsdlOs != null) {
                            wsdlOs.close();
                        }
                    }
View Full Code Here

           
            //change the import location in wsdl file
            OutputStream wsdloutput = new BufferedOutputStream(new FileOutputStream(wsdlFile));
            WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            wsdlWriter.writeWSDL(def, bout);
            Element defEle = XMLUtils.parse(bout.toByteArray()).getDocumentElement();
            List<Element> xsdElements = DOMUtils.findAllElementsByTagNameNS(defEle,
                                                                            WSDLConstants.NS_SCHEMA_XSD,
                                                                            "schema");
            for (Element xsdEle : xsdElements) {
View Full Code Here

                   
            for (Definition importDef : defs) {
                File importWsdlFile = new File(outputdir, importWSDLMap.get(importDef.getTargetNamespace()));
                OutputStream wsdlOs = new BufferedOutputStream(new FileOutputStream(importWsdlFile));
                bout = new ByteArrayOutputStream();
                wsdlWriter.writeWSDL(importDef, bout);
                Element importEle = XMLUtils.parse(bout.toByteArray()).getDocumentElement();

                xsdElements = DOMUtils.findAllElementsByTagNameNS(importEle, WSDLConstants.NS_SCHEMA_XSD,
                                                                  "schema");
                for (Element xsdEle : xsdElements) {
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.