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 di...@apache.org on 2006/09/29 23:06:40 UTC

svn commit: r451435 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java

Author: dims
Date: Fri Sep 29 14:06:40 2006
New Revision: 451435

URL: http://svn.apache.org/viewvc?view=rev&rev=451435
Log:
Fix for AXIS2-1245 - Invalid WSDL generation

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java?view=diff&rev=451435&r1=451434&r2=451435
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2OM.java Fri Sep 29 14:06:40 2006
@@ -412,8 +412,11 @@
             }
             OMElement port = fac.createOMElement(PORT, wsdl);
             service.addChild(port);
-            port.addAttribute(ATTRIBUTE_NAME, axisService.getName()
-                    + SOAP11PORT + ((protocol == null) ? "" : "_" + protocol), null);
+            String name = axisService.getName() + SOAP11PORT + ((protocol == null) ? "" : "_" + protocol);
+            if(i > 0) {
+                name += i;
+            }
+            port.addAttribute(ATTRIBUTE_NAME, name, null);
             port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":"
                     + axisService.getName() + BINDING_NAME_SUFFIX, null);
             addExtensionElement(fac, port, SOAP_ADDRESS, LOCATION, urlString,
@@ -432,8 +435,11 @@
             if (urlString != null && urlString.startsWith("http")) {
                 OMElement port = fac.createOMElement(PORT, wsdl);
                 service.addChild(port);
-                port.addAttribute(ATTRIBUTE_NAME, axisService.getName()
-                        + HTTP_PORT + i, null);
+                String name = axisService.getName() + HTTP_PORT;
+                if(i > 0) {
+                    name += i;
+                }
+                port.addAttribute(ATTRIBUTE_NAME, name, null);
                 port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":"
                         + axisService.getName() + HTTP_BINDING, null);
                 OMElement extElement = fac.createOMElement("address", http);
@@ -454,8 +460,11 @@
             }
             OMElement port = fac.createOMElement(PORT, wsdl);
             service.addChild(port);
-            port.addAttribute(ATTRIBUTE_NAME, axisService.getName()
-                    + SOAP12PORT + ((protocol == null) ? "" : "_" + protocol), null);
+            String name = axisService.getName() + SOAP12PORT + ((protocol == null) ? "" : "_" + protocol);
+            if(i > 0) {
+                name += i;
+            }
+            port.addAttribute(ATTRIBUTE_NAME, name, null);
             port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":"
                     + axisService.getName() + SOAP12BINDING_NAME_SUFFIX, null);
             addExtensionElement(fac, port, SOAP_ADDRESS, LOCATION, urlString,



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