You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ke...@apache.org on 2007/05/29 08:28:15 UTC

svn commit: r542425 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: description/AxisService2WSDL2.java util/WSDLSerializationUtil.java

Author: keithc
Date: Mon May 28 23:28:14 2007
New Revision: 542425

URL: http://svn.apache.org/viewvc?view=rev&rev=542425
Log:
Adding a trailing / to endpoints in wsdl2. If its not present httplocations done resolve correctly



Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java?view=diff&rev=542425&r1=542424&r2=542425
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java Mon May 28 23:28:14 2007
@@ -180,7 +180,11 @@
                 // of updating the endpoints.
                 AxisEndpoint axisEndpoint = (AxisEndpoint) iterator.next();
                 for (int i = 0; i < eprs.length; i++) {
-                    OMElement endpointElement = axisEndpoint.toWSDL20(wsdl, tns, whttp, eprs[i]);
+                    String epr = eprs[i];
+                    if (!epr.endsWith("/")) {
+                        epr = epr + "/";
+                    }
+                    OMElement endpointElement = axisEndpoint.toWSDL20(wsdl, tns, whttp, epr);
                     boolean endpointAlreadyAdded = false;
                     Iterator endpointsAdded = serviceElement.getChildren();
                     while (endpointsAdded.hasNext()) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java?view=diff&rev=542425&r1=542424&r2=542425
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java Mon May 28 23:28:14 2007
@@ -285,6 +285,10 @@
                             WSDL2Constants.INTERFACE_LOCAL_NAME, null,
                             tns.getPrefix() + ":" + WSDL2Constants.DEFAULT_INTERFACE_NAME));
         for (int i = 0; i < eprs.length; i++) {
+            String epr = eprs[i];
+            if (!epr.endsWith("/")) {
+                epr = epr + "/";
+            }
             OMElement soap11EndpointElement =
                     omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
             soap11EndpointElement.addAttribute(omFactory.createOMAttribute(
@@ -295,7 +299,7 @@
                     tns.getPrefix() + ":" + axisService.getName() +
                             Java2WSDLConstants.BINDING_NAME_SUFFIX));
             soap11EndpointElement.addAttribute(
-                    omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, eprs[i]));
+                    omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr));
             serviceElement.addChild(soap11EndpointElement);
             OMElement soap12EndpointElement =
                     omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
@@ -307,7 +311,7 @@
                     tns.getPrefix() + ":" + axisService.getName() +
                             Java2WSDLConstants.SOAP12BINDING_NAME_SUFFIX));
             soap12EndpointElement.addAttribute(
-                    omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, eprs[i]));
+                    omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr));
             serviceElement.addChild(soap12EndpointElement);
             OMElement httpEndpointElement =
                     omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
@@ -318,7 +322,7 @@
                     WSDL2Constants.BINDING_LOCAL_NAME, null,
                     tns.getPrefix() + ":" + axisService.getName() + Java2WSDLConstants.HTTP_BINDING));
             httpEndpointElement.addAttribute(
-                    omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, eprs[i]));
+                    omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr));
             serviceElement.addChild(httpEndpointElement);
         }
         return serviceElement;



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