Examples of writeWSDL()


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

    public static void writeWSDL(Definition def, Writer outputWriter)
        throws WSDLException, IOException {
        WSDLCorbaFactory wsdlfactory = new WSDLCorbaFactoryImpl();
        WSDLWriter writer = wsdlfactory.newWSDLWriter();
        writer.writeWSDL(def, outputWriter);

        outputWriter.flush();
        outputWriter.close();
    }
View Full Code Here

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


    public static void writeSchema(Definition def, Writer outputWriter) throws WSDLException, IOException {
        SchemaFactory sfactory = new SchemaFactoryImpl();
        WSDLWriter swriter = sfactory.newWSDLWriter();
        swriter.writeWSDL(def, outputWriter);

        outputWriter.flush();
        outputWriter.close();
    }
}
View Full Code Here

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

        ExtensionRegistry extReg = new ExtensionRegistry();
        addExtensions(extReg);
        reader.setExtensionRegistry(extReg);
        Definition wsdlDefn = reader.readWSDL(defnFile.toString());
        WSDLWriter wsdlWriter = factory.newWSDLWriter();
        wsdlWriter.writeWSDL(wsdlDefn, writer);
        writer.close();
        writer = null;
        reader = null;
        return bkFile;
    }
View Full Code Here

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

        try {
            for (WSDLInfo wsdlInfo : wsdls.values()) {
                Definition wsdlDefinition = wsdlInfo.getWSDLDefinition();
                WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                wsdlWriter.writeWSDL(wsdlDefinition, byteArrayOutputStream);
                byte[] wsdlResourceContent = byteArrayOutputStream.toByteArray();

                // create a resource this wsdlResourceContent and put it to the registry with the name
                // importedResourceName (in some path)
                String wsdlPath = wsdlInfo.getProposedRegistryURL();
View Full Code Here

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

        String importedResourceName =
                (String)processedWSDLMap.get(wsdlDefinition.getDocumentBaseURI());
        try {
            WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            wsdlWriter.writeWSDL(wsdlDefinition, byteArrayOutputStream);
            byte[] wsdlResourceContent = byteArrayOutputStream.toByteArray();

            // create a resource this wsdlResourceContent and put it to the registry with the name
            // importedResourceName (in some path)
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.writer.WSDL11Writer.writeWSDL()

            WSDL11Writer wsdl11Writer = new WSDL11Writer(
                    codeGenConfiguration.isFlattenFiles() ?
                            getOutputDirectory(codeGenConfiguration.getOutputLocation(), null) :
                            getOutputDirectory(codeGenConfiguration.getOutputLocation(),
                                    codeGenConfiguration.getResourceLocation()));
            wsdl11Writer.writeWSDL(axisService,
                    codeGenConfiguration.getWsdlDefinition(),
                    changedMap);

        }
    }
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.writer.WSDL20Writer.writeWSDL()

            WSDL20Writer wsdl20Writer = new WSDL20Writer(
                    codeGenConfiguration.isFlattenFiles() ?
                            getOutputDirectory(codeGenConfiguration.getOutputLocation(), null) :
                            getOutputDirectory(codeGenConfiguration.getOutputLocation(),
                                    codeGenConfiguration.getResourceLocation()));
            wsdl20Writer.writeWSDL(axisService);

        } else {
            // here we are going to write the wsdl and its imports
            // with out using the axis service.
View Full Code Here

Examples of org.jibx.ws.wsdl.WsdlLocationToRequestUrlAdapter.writeWSDL()

    @Test
    public void givenWsdlWithRelativeUrl_writeWsdl_shouldReturnBaseUrlFromRequestPlusRelativeUrl() throws Exception {
        String initialWsdl = wsdlWithLocation("/example/service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = wsdlWithLocation("http://test.example.com:80/example/service");
        XMLAssert.assertXMLEqual(expectedWsdl, responseWsdl);
    }
View Full Code Here

Examples of org.jibx.ws.wsdl.WsdlLocationToRequestUrlAdapter.writeWSDL()

    @Test
    public void givenWsdlWithAbsoluteUrl_writeWsdl_shouldReturnUrlWithBaseUrlReplaced() throws Exception {
        String initialWsdl = wsdlWithLocation("http://localhost:8081/example/service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = wsdlWithLocation("http://test.example.com:80/example/service");
        XMLAssert.assertXMLEqual(expectedWsdl, responseWsdl);
    }
View Full Code Here

Examples of org.jibx.ws.wsdl.WsdlLocationToRequestUrlAdapter.writeWSDL()

    @Test
    public void givenWsdlWithUnknownUrlFormat_writeWsdl_shouldReturnInitialUrl() throws Exception {
        String initialWsdl = wsdlWithLocation("service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        XMLAssert.assertXMLEqual(initialWsdl, responseWsdl);
    }
   
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.