axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r924393 - /axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
Date Wed, 17 Mar 2010 17:57:42 GMT
Author: nadiramra
Date: Wed Mar 17 17:57:42 2010
New Revision: 924393

URL: http://svn.apache.org/viewvc?rev=924393&view=rev
Log:
AXISCPP-1067 - User types with suffix _Array causes problems with code generator

Modified:
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java?rev=924393&r1=924392&r2=924393&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java Wed Mar 17
17:57:42 2010
@@ -638,11 +638,26 @@ public class WSDLInfo
                     QName arrayQName = CUtils.getArrayQNameForType(qn);
                     if (arrayQName == null)
                     {
-                        newqn = new QName(type.getQName().getNamespaceURI(), qn.getLocalPart()
 + "_Array" + typeCounter);
-                        ++typeCounter;
+                        do 
+                        {
+                            newqn = new QName(type.getQName().getNamespaceURI(), qn.getLocalPart()
 + "_Array" + typeCounter);
+                            ++typeCounter;
+                            typedata = c_typeMap.getType(newqn);
+                        }
+                        while (typedata != null && !typedata.isArray());
                         
-                        if (c_verbose)
-                            System.out.println("Type clash, change type name to : " + newqn);
+                        if (typedata == null)
+                        {
+                            if (c_verbose)
+                                System.out.println("Type clash, change type name to : " +
newqn);
+                        }
+                        else 
+                        {
+                            if (c_verbose && !CUtils.isPrimitiveType(type.getQName()))
+                                System.out.println("Type not created, already exists: " +
type.getQName());
+                            
+                            return typedata;                            
+                        }
                     }
                     else
                     {



Mime
View raw message