You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2006/06/07 06:05:51 UTC

svn commit: r412277 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: description/AxisService.java description/AxisService2WSDL2.java description/WSDL2Constants.java transport/http/HTTPWorker.java transport/http/ListingAgent.java

Author: deepal
Date: Tue Jun  6 21:05:51 2006
New Revision: 412277

URL: http://svn.apache.org/viewvc?rev=412277&view=rev
Log:
- Now we do support ?wsdl2 (print out WSDL2.0)
- It is not complete yet , but I am almost there :)
- deploy a service in SimpleHttpServer or tomcat and type ?wsdl2 and see
- there are few know issues that I need to fix other than that it assume to be OK

Added:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2Constants.java
Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=412277&r1=412276&r2=412277&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Tue Jun  6 21:05:51 2006
@@ -508,6 +508,11 @@
 
     public void printWSDL(OutputStream out, String requestIP, String servicePath) throws AxisFault {
         ArrayList eprList = new ArrayList();
+        String[] eprArray = getServiceEprs(requestIP, eprList);
+        getWSDL(out, eprArray, servicePath);
+    }
+
+    private String[] getServiceEprs(String requestIP, ArrayList eprList) throws AxisFault {
         AxisConfiguration axisConfig = getAxisConfiguration();
         if (enableAllTransport) {
             Iterator transports = axisConfig.getTransportsIn().values().iterator();
@@ -552,8 +557,7 @@
                 }
             }
         }
-        String eprArray [] = (String[]) eprList.toArray(new String[eprList.size()]);
-        getWSDL(out, eprArray, servicePath);
+        return (String[]) eprList.toArray(new String[eprList.size()]);
     }
 
     /**
@@ -584,6 +588,47 @@
                     serviceURL, "document", "literal", servicePath);
             try {
                 OMElement wsdlElement = axisService2WOM.generateOM();
+                wsdlElement.serialize(out);
+                out.flush();
+                out.close();
+            } catch (Exception e) {
+                throw new AxisFault(e);
+            }
+        } else {
+            try {
+                String wsdlntfound = "<error>" +
+                        "<description>Unable to generate WSDL for this service</description>" +
+                        "<reason>Either user has not dropped the wsdl into META-INF or" +
+                        " operations use message receivers other than RPC.</reason>" +
+                        "</error>";
+                out.write(wsdlntfound.getBytes());
+                out.flush();
+                out.close();
+            } catch (IOException e) {
+                throw new AxisFault(e);
+            }
+        }
+
+    }
+
+    //WSDL 2.0
+    public void printWSDL2(OutputStream out) throws AxisFault {
+        setWsdlfound(true);
+        //pick the endpoint and take it as the epr for the WSDL
+        getWSDL2(out, new String[]{getEndpoint()}, "services");
+    }
+
+    public void printWSDL2(OutputStream out, String requestIP, String servicePath) throws AxisFault {
+        ArrayList eprList = new ArrayList();
+        String[] eprArray = getServiceEprs(requestIP, eprList);
+        getWSDL2(out, eprArray, servicePath);
+    }
+
+    private void getWSDL2(OutputStream out, String [] serviceURL, String servicePath) throws AxisFault {
+        if (isWsdlfound()) {
+            AxisService2WSDL2 axisService2WSDL2 = new AxisService2WSDL2(this, serviceURL);
+            try {
+                OMElement wsdlElement = axisService2WSDL2.generateOM();
                 wsdlElement.serialize(out);
                 out.flush();
                 out.close();

Added: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java?rev=412277&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java (added)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java Tue Jun  6 21:05:51 2006
@@ -0,0 +1,300 @@
+package org.apache.axis2.description;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.StAXUtils;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.ws.commons.schema.XmlSchema;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import java.io.ByteArrayInputStream;
+import java.io.StringWriter;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+public class AxisService2WSDL2 implements WSDL2Constants {
+
+    private AxisService axisService;
+
+    private String[] url;
+    private OMNamespace wsoap;
+    private OMNamespace tns;
+
+
+    public AxisService2WSDL2(AxisService service, String[] serviceURL) {
+        this.axisService = service;
+        url = serviceURL;
+    }
+
+    public OMElement generateOM() throws Exception {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        fac.createOMNamespace(WSDL_NAMESPACE,
+                DEFAULT_WSDL_NAMESPACE_PREFIX);
+        OMElement description = fac.createOMElement(DESCRIPTION, null);
+        Map nameSpaceMap = axisService.getNameSpacesMap();
+        Iterator keys = nameSpaceMap.keySet().iterator();
+        while (keys.hasNext()) {
+            String key = (String) keys.next();
+            if ("".equals(key)) {
+                description.declareDefaultNamespace((String) nameSpaceMap.get(key));
+            } else {
+                description.declareNamespace((String) nameSpaceMap.get(key), key);
+            }
+        }
+        wsoap = description.declareNamespace(URI_WSDL2_SOAP, SOAP_PREFIX);
+        description.declareNamespace(URI_WSDL2_SOAP_ENV, SOAP_ENV_PREFIX);
+        String prefix = getPrefix(axisService.getTargetNamespace());
+        if (prefix == null || "".equals(prefix)) {
+            prefix = DEFAULT_TARGET_NAMESPACE_PREFIX;
+        }
+        axisService.getNameSpacesMap().put(prefix,
+                axisService.getTargetNamespace());
+        tns = description.declareNamespace(axisService.getTargetNamespace(), prefix);
+
+        description.addAttribute("targetNamespace", axisService.getTargetNamespace(),
+                null);
+        //adding service document
+        if (axisService.getServiceDescription() != null) {
+            addDocumentTation(description, fac, axisService.getServiceDescription());
+        }
+        OMElement wsdlTypes = fac.createOMElement("types", null);
+        description.addChild(wsdlTypes);
+        // populate the schema mappings
+        axisService.populateSchemaMappings();
+        ArrayList schemas = axisService.getSchema();
+        for (int i = 0; i < schemas.size(); i++) {
+            StringWriter writer = new StringWriter();
+            XmlSchema schema = axisService.getSchema(i);
+            schema.write(writer);
+            if (!"".equals(writer.toString())) {
+                XMLStreamReader xmlReader = StAXUtils
+                        .createXMLStreamReader(new ByteArrayInputStream(writer
+                                .toString().getBytes()));
+
+                StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
+                wsdlTypes.addChild(staxOMBuilder.getDocumentElement());
+            }
+        }
+        //generating interface
+        generateInterface(description, fac);
+
+        //generating soap binding
+        generateSOAPBinding(description, fac);
+
+        //generating service element
+        generateServiceElement(description, fac);
+
+        return description;
+    }
+
+    /**
+     * To add documenttaion tag to any given element
+     *
+     * @param element
+     * @param factory
+     * @param docmentString
+     */
+    private void addDocumentTation(OMElement element,
+                                   OMFactory factory,
+                                   String docmentString) {
+        OMElement documentation = factory.createOMElement(DOCUMENTATION, wsoap);
+        documentation.setText(docmentString);
+        element.addChild(documentation);
+
+    }
+
+    private void generateInterface(OMElement description, OMFactory fac) {
+        OMElement interfaceElement = fac.createOMElement(INTERFACE_LOCAL_NAME, null);
+        interfaceElement.addAttribute("name", axisService.getName() + INTERFACE_PREFIX, null);
+        generateInterfaceFaultElement(interfaceElement, fac);
+        generateInterfaceOperations(interfaceElement, fac);
+        description.addChild(interfaceElement);
+    }
+
+    private void generateInterfaceOperations(OMElement interfaceElement, OMFactory fac) {
+        Iterator operations = axisService.getOperations();
+        while (operations.hasNext()) {
+            AxisOperation axisOperation = (AxisOperation) operations.next();
+            if (axisOperation.isControlOperation()) {
+                continue;
+            }
+            String operationName = axisOperation.getName().getLocalPart();
+            OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME,
+                    null);
+            interfaceElement.addChild(operation);
+            operation.addAttribute(ATTRIBUTE_NAME, operationName, null);
+            String MEP = axisOperation.getMessageExchangePattern();
+            operation.addAttribute(ATTRIBUTE_NAME_PATTERN, getUpdatedMEP(MEP), null);
+            //TODO need to add : style="http://www.w3.org/2006/01/wsdl/style/iri"
+            //TODO need to add : swsdlx:safe = "true"
+            if (WSDLConstants.MEP_URI_IN_ONLY.equals(MEP)
+                    || WSDLConstants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)
+                    || WSDLConstants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP)
+                    || WSDLConstants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP)
+                    || WSDLConstants.MEP_URI_ROBUST_IN_ONLY.equals(MEP)
+                    || WSDLConstants.MEP_URI_IN_OUT.equals(MEP)) {
+                AxisMessage inaxisMessage = axisOperation
+                        .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                if (inaxisMessage != null) {
+                    OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME,
+                            null);
+                    input.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_IN_VALUE, null);
+                    operation.addChild(input);
+                    addMessageElementAtt(input, inaxisMessage);
+                }
+            }
+
+            if (WSDLConstants.MEP_URI_OUT_ONLY.equals(MEP)
+                    || WSDLConstants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP)
+                    || WSDLConstants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)
+                    || WSDLConstants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP)
+                    || WSDLConstants.MEP_URI_ROBUST_IN_ONLY.equals(MEP)
+                    || WSDLConstants.MEP_URI_IN_OUT.equals(MEP)) {
+                AxisMessage outAxisMessage = axisOperation
+                        .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+                if (outAxisMessage != null) {
+                    OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME,
+                            null);
+                    operation.addChild(output);
+                    output.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_OUT_VALUE, null);
+                    addMessageElementAtt(output, outAxisMessage);
+                }
+            }
+            addInterfaceOperationFault(operation, fac, axisOperation);
+        }
+    }
+
+    private void addMessageElementAtt(OMElement messageElement, AxisMessage message) {
+        QName elementQName = message.getElementQName();
+        String attValue = elementQName.getPrefix() + ":" + elementQName.getLocalPart();
+        messageElement.addAttribute(ATTRIBUTE_ELEMENT, attValue, null);
+    }
+
+    private void addInterfaceOperationFault(OMElement opElment, OMFactory fac,
+                                            AxisOperation operation) {
+
+        //TODO : I am not complete yet
+
+    }
+
+    private void generateInterfaceFaultElement(OMElement interfaceElement, OMFactory fac) {
+        //TODO : Not yet implemented
+    }
+
+    private void generateSOAPBinding(OMElement description, OMFactory fac) {
+        OMElement bindingElement = fac.createOMElement(BINDING_LOCAL_NAME, null);
+        description.addChild(bindingElement);
+        bindingElement.addAttribute("name", axisService.getName() + SOAP_BINDING_PREFIX, null);
+        bindingElement.addAttribute(INTERFACE_LOCAL_NAME, axisService.getName() +
+                INTERFACE_PREFIX, tns);
+        bindingElement.addAttribute("type", URI_WSDL2_SOAP, null);
+        bindingElement.addAttribute("protocol", HTTP_PROTOCAL, wsoap);
+
+        addBindingFaultElement(bindingElement, fac);
+        generateBindingOperations(bindingElement, fac);
+
+    }
+
+    private void addBindingFaultElement(OMElement bindingElement, OMFactory fac) {
+        //TODO : need to implement this
+    }
+
+    private void generateBindingOperations(OMElement bindingElement, OMFactory fac) {
+        Iterator operations = axisService.getOperations();
+        while (operations.hasNext()) {
+            AxisOperation axisOperation = (AxisOperation) operations.next();
+            if (axisOperation.isControlOperation()) {
+                continue;
+            }
+            OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, null);
+            bindingElement.addChild(operation);
+            String MEP = axisOperation.getMessageExchangePattern();
+            operation.addAttribute("ref", tns.getPrefix() + ":" +
+                    axisOperation.getName().getLocalPart(), null);
+            //TODO : I am not sure whether I am doing the right thing here , need to read the spec
+            operation.addAttribute("mep", getMep(axisOperation.getMessageExchangePattern()), wsoap);
+        }
+    }
+
+    private void generateServiceElement(OMElement description, OMFactory fac) throws Exception {
+        OMElement serviceElement = fac.createOMElement(SERVICE_LOCAL_NAME, null);
+        serviceElement.addAttribute(ATTRIBUTE_NAME, axisService.getName() + "Service", null);
+        serviceElement.addAttribute(INTERFACE_LOCAL_NAME, tns.getPrefix()
+                + ":" + axisService.getName() + INTERFACE_PREFIX, null);
+
+        description.addChild(serviceElement);
+        generateEndpoints(serviceElement, fac);
+    }
+
+    private void generateEndpoints(OMElement serviceElement, OMFactory fac) throws Exception {
+        int count;
+        for (int i = 0; i < url.length; i++) {
+            String s = url[i];
+            OMElement endpoint = fac.createOMElement("endpoint", null);
+            URL url = new URL(s);
+            endpoint.addAttribute(ATTRIBUTE_NAME, axisService.getName()
+                    + "Endpoint" + "_" + url.getProtocol(), null);
+            //TODO : We have to have mechnishm to support multiple bindings
+            endpoint.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":" +
+                    axisService.getName() + SOAP_BINDING_PREFIX, null);
+            endpoint.addAttribute("address", s, null);
+            serviceElement.addChild(endpoint);
+        }
+    }
+
+    /**
+     * To get the soap mep for given wsdl2.0 mep
+     */
+    private String getMep(String mep) {
+        //TODO : need to fix this , this wrong
+        return "http://www.w3.org/2003/05/soap/mep/soap-response";
+    }
+
+
+    /**
+     * This method is to convert http://www.w3.org/2004/08/wsdl/in-out to
+     * http://www.w3.org/2006/01/wsdl/in-out
+     *
+     * @param oldmepuri
+     */
+    public String getUpdatedMEP(String oldmepuri) {
+        //TODO : Need to improve this , what I am doing is wrong
+        return oldmepuri.replaceAll("2004/08", "2006/01");
+    }
+
+    private String getPrefix(String targetNameSpace) {
+        Map map = axisService.getNameSpacesMap();
+        Iterator keys = map.keySet().iterator();
+        while (keys.hasNext()) {
+            String key = (String) keys.next();
+            if (map.get(key).equals(targetNameSpace)) {
+                return key;
+            }
+        }
+        return null;
+    }
+}

Added: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2Constants.java?rev=412277&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2Constants.java (added)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL2Constants.java Tue Jun  6 21:05:51 2006
@@ -0,0 +1,46 @@
+package org.apache.axis2.description;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+public interface WSDL2Constants {
+    String WSDL_NAMESPACE = "http://www.w3.org/2006/01/wsdl";
+    String DEFAULT_WSDL_NAMESPACE_PREFIX = "wsdl2";
+    String DESCRIPTION = "description";
+    String URI_WSDL2_SOAP = "http://www.w3.org/2006/01/wsdl/soap";
+    String SOAP_PREFIX = "wsoap";
+    String URI_WSDL2_SOAP_ENV = "http://www.w3.org/2003/05/soap-envelope";
+    String SOAP_ENV_PREFIX = "soap";
+    String DEFAULT_TARGET_NAMESPACE_PREFIX = "axis2";
+    String DOCUMENTATION = "documentation";
+
+    String INTERFACE_LOCAL_NAME = "interface";
+    String INTERFACE_PREFIX = "Interface";
+    String OPERATION_LOCAL_NAME = "operation";
+    String ATTRIBUTE_NAME = "name";
+    String IN_PUT_LOCAL_NAME = "input";
+    String OUT_PUT_LOCAL_NAME = "output";
+    String ATTRIBUTE_NAME_PATTERN = "pattern";
+    String MESSAGE_LABEL = "messageLabel";
+    String ATTRIBUTE_ELEMENT = "element";
+
+    String BINDING_LOCAL_NAME = "binding ";
+    String SOAP_BINDING_PREFIX = "SOAPBinding";
+    String HTTP_PROTOCAL = "http://www.w3.org/2003/05/soap/bindings/HTTP";
+    String SERVICE_LOCAL_NAME = "service";
+}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java?rev=412277&r1=412276&r2=412277&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java Tue Jun  6 21:05:51 2006
@@ -158,6 +158,30 @@
                         }
                     }
                 }
+                if (uri.endsWith("?wsdl2")) {
+                    String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.length() - 6);
+                    HashMap services = configurationContext.getAxisConfiguration().getServices();
+                    AxisService service = (AxisService) services.get(serviceName);
+                    if (service != null) {
+                        response.addHeader(new Header("Content-Type", "text/xml"));
+//                        String url = conn.getURL(uri.substring(1, uri.length() - 5));
+                        String url = conn.getURL("");
+                        int ipindex = url.indexOf("//");
+                        String ip = null;
+                        if (ipindex >= 0) {
+                            ip = url.substring(ipindex + 2, url.length());
+                            int seperatorIndex = ip.indexOf(":");
+                            if (seperatorIndex > 0) {
+                                ip = ip.substring(0, seperatorIndex);
+                            }
+                        }
+                        service.printWSDL2(baos, ip, servicePath);
+                        byte[] buf = baos.toByteArray();
+                        response.setBody(new ByteArrayInputStream(buf));
+                        conn.writeResponse(response);
+                        return true;
+                    }
+                }
 
                 if (uri.endsWith("?wsdl")) {
                     String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.length() - 5);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=412277&r1=412276&r2=412277&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java Tue Jun  6 21:05:51 2006
@@ -120,6 +120,7 @@
                 filePart.length());
         HashMap services = configContext.getAxisConfiguration().getServices();
         String wsdl = req.getParameter("wsdl");
+        String wsdl2 = req.getParameter("wsdl2");
         String xsd = req.getParameter("xsd");
         if ((services != null) && !services.isEmpty()) {
             Object serviceObj = services.get(serviceName);
@@ -146,6 +147,28 @@
                     out.flush();
                     out.close();
                     return;
+                } else if (wsdl2 != null) {
+                    OutputStream out = res.getOutputStream();
+                    res.setContentType("text/xml");
+                    int ipindex = filePart.indexOf("//");
+                    String ip = null;
+                    if (ipindex >= 0) {
+                        ip = filePart.substring(ipindex + 2, filePart.length());
+                        int seperatorIndex = ip.indexOf(":");
+                        int slashIndex = ip.indexOf("/");
+                        String port = ip.substring(seperatorIndex + 1,
+                                slashIndex);
+                        if ("http".equals(req.getScheme())) {
+                            configContext.setProperty(RUNNING_PORT, port);
+                        }
+                        if (seperatorIndex > 0) {
+                            ip = ip.substring(0, seperatorIndex);
+                        }
+                    }
+                    ((AxisService) serviceObj).printWSDL2(out, ip, servicePath);
+                    out.flush();
+                    out.close();
+                    return;
                 } else if (xsd != null) {
                     OutputStream out = res.getOutputStream();
                     res.setContentType("text/xml");
@@ -237,7 +260,7 @@
         }
 
         public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault {
-            return new EndpointReference(schema + "://" + ip + ":" + port + conetxtPath +"/" +serviceName);
+            return new EndpointReference(schema + "://" + ip + ":" + port + conetxtPath + "/" + serviceName);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org