Examples of printWSDL()


Examples of org.apache.axis2.description.AxisService.printWSDL()

            AxisService axisService = builder.populateService();
            ConfigurationContext configContext = ConfigurationContextFactory.createDefaultConfigurationContext();
            AxisConfiguration axisConfig = configContext.getAxisConfiguration();
            axisConfig.addService(axisService);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            axisService.printWSDL(baos);
            assertXMLEqual(new FileReader(testResourceFile), new StringReader(new String(baos.toByteArray())));
        } catch (Exception e) {
            System.out.println("Error in WSDL : " + testResourceFile.getName());
            System.out.println("Exception: " + e.toString());
            fail("Caught exception " + e.toString());
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                if (service != null) {
                    boolean canExposeServiceMetadata = canExposeServiceMetadata(service);
                    if (canExposeServiceMetadata) {
                        response.setStatus(HttpStatus.SC_OK);
                        response.setContentType("text/xml");
                        service.printWSDL(response.getOutputStream(), getHost(request));
                    } else {
                        response.setStatus(HttpStatus.SC_FORBIDDEN);
                    }
                    return;
                }
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                    if (wsdlName != null && wsdlName.length()>0) {
                        axisService.printUserWSDL(out, wsdlName);
                        out.flush();
                        out.close();
                    } else {
                        axisService.printWSDL(out, ip);
                        out.flush();
                        out.close();
                    }
                    return;
                } else if (xsd >= 0) {
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                HashMap services = configurationContext.getAxisConfiguration().getServices();
                AxisService service = (AxisService) services.get(serviceName);
                if (service != null) {
                    response.setStatus(HttpStatus.SC_OK);
                    response.setContentType("text/xml");
                    service.printWSDL(response.getOutputStream(), getHost(request));
                    return;
                }
            }
            if (uri.endsWith("?xsd")) {
                String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.length() - 4);
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                        WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(new FileInputStream(file1), null, null);
                        AxisService service = builder.populateService();
                        System.out.println("Testinf file: " + file1.getName());
                        configContext.getAxisConfiguration().addService(service);
                        OutputStream out = new FileOutputStream(new File(outLocation, file1.getName()));
                        service.printWSDL(out, "http://google.com/axis2/services" ,"services");
                        out.flush();
                        out.close();
//                        URL wsdlURL = new URL("http://localhost:" + 6060 +
//                                "/axis2/services/" + service.getName() + "?wsdl");
//                        builder = new WSDL11ToAxisServiceBuilder(wsdlURL.openStream(), null, null);
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                if (service != null) {
                    final String ip = HttpUtils.getIpAddress();
                    EntityTemplate entity = new EntityTemplate(new ContentProducer() {

                        public void writeTo(final OutputStream outstream) throws IOException {
                            service.printWSDL(outstream, ip, servicePath);
                        }

                    });
                    entity.setContentType("text/xml");
                    entity.setChunked(chunked);
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                    WSDLFactory factory = WSDLFactory.newInstance();
                    WSDLWriter writer = factory.newWSDLWriter();                   
                    writer.writeWSDL(portInfo.getWsdlDefinition(), response.getOutputStream());
                    return;
                }else {
                    service.printWSDL(response.getOutputStream());
                    return;
                }
            }
            //TODO: Not working properly and do we need to have these requests ?
            if (uri.getQuery().startsWith("xsd=")) {
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                    String wsdlName = req.getParameter("wsdl");

                    if (wsdlName != null && wsdlName.length()>0) {
                        axisService.printUserWSDL(out, wsdlName, ip);
                    } else {
                        axisService.printWSDL(out, ip);
                    }
                    return;
                } else if (xsd >= 0) {
                    res.setContentType("text/xml");
                    int ret = axisService.printXSD(res.getOutputStream(), req.getParameter("xsd"));
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                HashMap services = configurationContext.getAxisConfiguration().getServices();
                AxisService service = (AxisService) services.get(serviceName);
                if (service != null) {
                    response.setStatus(HttpStatus.SC_OK);
                    response.setContentType("text/xml");
                    service.printWSDL(response.getOutputStream(), getHost(request));
                    return;
                }
            }
            if (uri.endsWith("?xsd")) {
                String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.length() - 4);
View Full Code Here

Examples of org.apache.axis2.description.AxisService.printWSDL()

                        WSDL2AxisServiceBuilder builder = new WSDL2AxisServiceBuilder(new FileInputStream(file1), null, null);
                        AxisService service = builder.populateService();
                        System.out.println("Testinf file: " + file1.getName());
                        configContext.getAxisConfiguration().addService(service);
                        OutputStream out = new FileOutputStream(new File(outLocation, file1.getName()));
                        service.printWSDL(out, "http://google.com/axis2/services");
                        out.flush();
                        out.close();
//                        URL wsdlURL = new URL("http://localhost:" + 6060 +
//                                "/axis2/services/" + service.getName() + "?wsdl");
//                        builder = new WSDL2AxisServiceBuilder(wsdlURL.openStream(), null, null);
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.