axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1427562 - in /axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws: CUtils.java c/BeanParamWriter.java c/ParmHeaderFileWriter.java cpp/BeanParamWriter.java cpp/ParmHeaderFileWriter.java info/WSDLInfo.java
Date Tue, 01 Jan 2013 21:06:51 GMT
Author: nadiramra
Date: Tue Jan  1 21:06:50 2013
New Revision: 1427562

URL: http://svn.apache.org/viewvc?rev=1427562&view=rev
Log:
AXISCPP-505 WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types (stage 1)

Modified:
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
    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/CUtils.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java?rev=1427562&r1=1427561&r2=1427562&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java Tue Jan  1 21:06:50
2013
@@ -1122,6 +1122,32 @@ public class CUtils 
     }
     
     /**
+     * Sanitizes a string so that it can be used in generated code. 
+     * The '*' character is not touched.
+     * 
+     */
+    public static String sanitizeStringWithSplats( String name)
+    {
+        if (name == null)
+            return name;
+        
+        String sanitisedName=name.trim();
+        int i = -1;
+        if (sanitisedName.endsWith("*"))
+            i = sanitisedName.lastIndexOf('*');
+        String suffix = "";
+        String prefix = sanitisedName;
+        
+        if (i != -1)
+        {
+            suffix = sanitisedName.substring(i);
+            prefix = sanitisedName.substring(0, i).trim();
+        }
+        
+        sanitisedName = sanitizeString(prefix) + suffix;
+        return sanitisedName;
+    }
+    /**
      * NOT CURRENTLY USED.
      * This routine is used to basically handle anonymous type naming.  Anonymous types
      * have names such as '>type' and '>>type>type2', the latter being a nested
type. 

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java?rev=1427562&r1=1427561&r2=1427562&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java Tue Jan
 1 21:06:50 2013
@@ -645,14 +645,14 @@ public class BeanParamWriter extends Par
                     c_writer.write("\n");
                  
                     c_writer.write(tab2 + "param->" + attribs[i].getParamNameAsMember()

-                            + " = (" + containedTypeArrayName + " *)" 
+                            + " = (" + CUtils.sanitizeString(containedTypeArrayName) + "
*)" 
                             + "axiscSoapDeSerializerGetBasicArray(pDZ, " 
                             + CUtils.getXSDEnumeratorForType(baseTypeName) + ", \"" 
                             + attribs[i].getParamNameAsSOAPString() + "\",0);\n");
                 }
                 else
                 {
-                    arrayType = attribs[i].getTypeName();
+                    arrayType = CUtils.sanitizeString(attribs[i].getTypeName());
                     c_writer.write(tab1 + "axiscSoapDeSerializerGetCmplxArray(pDZ, (Axisc_Array
*)param->" + attribs[i].getParamNameAsMember() 
                             + ", (void*)Axis_DeSerialize_"  + arrayType 
                             + ", (void*)Axis_Create_" + arrayType 
@@ -692,7 +692,7 @@ public class BeanParamWriter extends Par
                     
                     c_writer.write(tab2 + "{\n"); // start local scope
                     
-                    c_writer.write(tab2 + "\t" + CUtils.resolveWSDL2LanguageNameClashes(attribs[i].getTypeName())
+ " * "
+                    c_writer.write(tab2 + "\t" + CUtils.sanitizeString((attribs[i].getTypeName()))
+ " * "
                         + attribs[i].getParamNameAsMember() + " = " 
                         + "axiscSoapDeSerializer"
                         + CUtils.getDeserializerMethodName(attribs[i].getTypeName(), attribs[i].isAttribute())

@@ -851,7 +851,7 @@ public class BeanParamWriter extends Par
                     containedTypeArrayName = CUtils.getArrayNameForType(baseTypeName);
                     
                     c_writer.write("\t\tpTemp->" + attribs[i].getParamNameAsMember() 
-                            + " = (" + containedTypeArrayName + " *)axiscAxisNew(XSDC_ARRAY,
0);\n");
+                            + " = (" + CUtils.sanitizeString(containedTypeArrayName) + "
*)axiscAxisNew(XSDC_ARRAY, 0);\n");
                     
                     c_writer.write("\t\tpTemp->" + attribs[i].getParamNameAsMember() +
"->m_Type = " 
                             + CUtils.getXSDEnumeratorForType(baseTypeName) + ";\n");
@@ -861,7 +861,7 @@ public class BeanParamWriter extends Par
                     containedTypeArrayName = CUtils.getArrayNameForType(attribs[i].getTypeName());
 
                     c_writer.write("\t\tpTemp->" + attribs[i].getParamNameAsMember() +
" = "
-                            + "Axis_Create_" + containedTypeArrayName + "(0);\n");
+                            + "Axis_Create_" + CUtils.sanitizeString(containedTypeArrayName)
+ "(0);\n");
                 }     
             }
         }
@@ -961,10 +961,10 @@ public class BeanParamWriter extends Par
                 
                 if (attribs[i].isArray())
                     c_writer.write("\t\t\tAxis_Delete_" 
-                            + CUtils.getArrayNameForType(attribs[i].getTypeName())  
+                            + CUtils.sanitizeString(CUtils.getArrayNameForType(attribs[i].getTypeName()))
 
                             + "(param->" + attribs[i].getParamNameAsMember() + ", 0);\n");
 
                 else
-                    c_writer.write("\t\t\tAxis_Delete_" + attribs[i].getTypeName() 
+                    c_writer.write("\t\t\tAxis_Delete_" + CUtils.sanitizeString(attribs[i].getTypeName())

                             + "(param->" + attribs[i].getParamNameAsMember() + ", 0);\n");
    
             }
         }

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java?rev=1427562&r1=1427561&r2=1427562&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java Tue
Jan  1 21:06:50 2013
@@ -289,14 +289,14 @@ public class ParmHeaderFileWriter extend
                 }
 
                 // Print out field.
-                c_writer.write("\t" + CUtils.resolveWSDL2LanguageNameClashes(paramType) +
" " + paramName + ";\n");
+                c_writer.write("\t" + CUtils.sanitizeStringWithSplats(paramType) + " " +
paramName + ";\n");
             }
             
             if (extensionBaseAttrib != null &&
                 getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib) !=
null)
             {
                 c_writer.write("\t"
-                             + CUtils.sanitizeString(getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib))
+                             + CUtils.sanitizeStringWithSplats(getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib))
                              + "  "
                              + extensionBaseAttrib.getParamNameAsMember() + ";\n");
             }            
@@ -405,13 +405,13 @@ public class ParmHeaderFileWriter extend
                 Type theType = attribs[i].getType();
 
                 if (theType.isRestriction() && !CUtils.isPrimitiveType(basicType))
-                    typeSet.add(basicType);
+                    typeSet.add(CUtils.sanitizeString(basicType));
                 else if (!attribs[i].isSimpleType() && !attribs[i].isAnyElement())
                 {
                     if ((attribs[i].isArray()) && !theType.isSimpleType())
-                        typeSet.add(CUtils.getArrayNameForType(basicType));
+                        typeSet.add(CUtils.sanitizeString(CUtils.getArrayNameForType(basicType)));
     
-                    typeSet.add(basicType);
+                    typeSet.add(CUtils.sanitizeString(basicType));
                 }
             }
             
@@ -438,7 +438,7 @@ public class ParmHeaderFileWriter extend
                 // Do not want to include the header file we are generating!
                 String includeFile = itr.next().toString();
                 if (!includeFile.equals(c_classname))
-                   c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(includeFile)
+ CUtils.getHeaderFileExtension() + "\"\n");
+                   c_writer.write("#include \"" + includeFile + CUtils.getHeaderFileExtension()
+ "\"\n");
             }
 
             c_writer.write("\n");
@@ -458,7 +458,7 @@ public class ParmHeaderFileWriter extend
                         !(attribs[i].isSimpleType() || attribs[i].getType().isSimpleType())
                         && !attribs[i].isAnyElement())
                 {
-                    typeSet.add(attribs[i].getTypeName());
+                    typeSet.add(CUtils.sanitizeString(attribs[i].getTypeName()));
                 } 
             }
             

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?rev=1427562&r1=1427561&r2=1427562&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java Tue
Jan  1 21:06:50 2013
@@ -124,6 +124,9 @@ public class BeanParamWriter extends Par
                     methodName = methodName + Integer.toString(anyCounter);
                 }
                 
+                properParamType = CUtils.sanitizeStringWithSplats(properParamType);
+                type            = CUtils.sanitizeString(type);
+                
                 //=============================================================================
                 // Write getter method
                 //=============================================================================
     
@@ -131,8 +134,7 @@ public class BeanParamWriter extends Par
                 CUtils.printMethodComment(c_writer, "Getter method for class member field
" 
                         + parameterName + ".");
                 
-                c_writer.write(CUtils.resolveWSDL2LanguageNameClashes(properParamType) +
asterisk + c_classname
-                        + "::\nget" + methodName + "()\n{\n");
+                c_writer.write(properParamType + asterisk + c_classname + "::\nget" + methodName
+ "()\n{\n");
 
                 c_writer.write("\t" + "return " + parameterName + "; \n}\n");
 
@@ -165,7 +167,7 @@ public class BeanParamWriter extends Par
                 {
                     // Setter method
                     c_writer.write("void " + c_classname + "::\nset"
-                            + methodName + "(" + CUtils.resolveWSDL2LanguageNameClashes(properParamType)
 
+                            + methodName + "(" + properParamType  
                             + " pInValue, bool deep, bool makeCopy)\n{\n");
                     
                     if (attribs[i].getChoiceElement())
@@ -183,7 +185,7 @@ public class BeanParamWriter extends Par
                     c_writer.write("\t\tif (deep && makeCopy)\n");
                     c_writer.write("\t\t{\n");
                     
-                    c_writer.write("\t\t\t" + parameterName + " = new " + CUtils.resolveWSDL2LanguageNameClashes(type)
+ "();\n");
+                    c_writer.write("\t\t\t" + parameterName + " = new " + type + "();\n");
 
                     c_writer.write("\t\t\t*" + parameterName + " = *pInValue;\n");
                     c_writer.write("\t\t}\n");
@@ -198,7 +200,7 @@ public class BeanParamWriter extends Par
                 else
                 {
                     c_writer.write("void " + c_classname + "::\nset"
-                            + methodName + "(" + CUtils.resolveWSDL2LanguageNameClashes(properParamType)
+ " InValue");
+                            + methodName + "(" + properParamType + " InValue");
                                         
                     Type attributeType = attribs[i].getType();
                     
@@ -250,7 +252,7 @@ public class BeanParamWriter extends Par
                         c_writer.write("\t{\n");
                         c_writer.write("\t\tif (deep && makeCopy)\n");
                         c_writer.write("\t\t{\n");
-                        c_writer.write("\t\t\t" + parameterName + " = new " + CUtils.resolveWSDL2LanguageNameClashes(type)
+ "();\n");
+                        c_writer.write("\t\t\t" + parameterName + " = new " + type + "();\n");
                         c_writer.write("\t\t\t*" + parameterName + " = *InValue;\n");
                         c_writer.write("\t\t}\n");
                         c_writer.write("\t\telse\n");
@@ -869,17 +871,17 @@ public class BeanParamWriter extends Par
                             + attribs[i].getParamNameAsSOAPString()
                             + "\",0);\n");
                     c_writer.write(tab2 + "if(param->" + attribs[i].getParamNameAsMember()
+ " == NULL)\n");
-                    c_writer.write(tab2 + "\tparam->" + attribs[i].getParamNameAsMember()
+ " = new " + containedTypeArrayName + "();\n");
+                    c_writer.write(tab2 + "\tparam->" + attribs[i].getParamNameAsMember()
+ " = new " + CUtils.sanitizeString(containedTypeArrayName) + "();\n");
                     c_writer.write(tab2 + "param->" + attribs[i].getParamNameAsMember()
+ "->clone( *array" + arrayCount + ");\n");
                     c_writer.write(tab2 + "Axis::AxisDelete((void*) array" + arrayCount +
", XSD_ARRAY);\n\n");
                 }
                 else
                 {
-                    arrayType = attribs[i].getTypeName();
+                    arrayType = CUtils.sanitizeString(attribs[i].getTypeName());
                     containedTypeArrayName = CUtils.getArrayNameForType(arrayType);
                     
                     c_writer.write(tab2 + "if(param->" + attribs[i].getParamNameAsMember()
+ " == NULL)\n");
-                    c_writer.write(tab2 + "\tparam->" + attribs[i].getParamNameAsMember()
+ " = new " + containedTypeArrayName + "();\n");
+                    c_writer.write(tab2 + "\tparam->" + attribs[i].getParamNameAsMember()
+ " = new " + CUtils.sanitizeString(containedTypeArrayName) + "();\n");
                     c_writer.write(tab2 + "pIWSDZ->getCmplxArray(param->" + attribs[i].getParamNameAsMember()

                             + ", (void*)Axis_DeSerialize_" + arrayType
                             + ", (void*)Axis_Create_" + arrayType 
@@ -907,13 +909,13 @@ public class BeanParamWriter extends Par
                 
                 if( isPointerType)
                 {
-                    c_writer.write(tab2 + CUtils.resolveWSDL2LanguageNameClashes(typeName)
+ " pValue" + i + " = pIWSDZ->" +
+                    c_writer.write(tab2 + CUtils.sanitizeString(typeName) + " pValue" + i
+ " = pIWSDZ->" +
                             CUtils.getDeserializerMethodName(baseTypeName, attribs[i].isAttribute())
+
                             "(\"" + soapTagName + "\", 0);\n");
                 }
                 else
                 {
-                    c_writer.write(tab2 + CUtils.resolveWSDL2LanguageNameClashes(typeName)
+ " * pValue" + i + " = pIWSDZ->" +
+                    c_writer.write(tab2 + CUtils.sanitizeString(typeName) + " * pValue" +
i + " = pIWSDZ->" +
                             CUtils.getDeserializerMethodName(baseTypeName, attribs[i].isAttribute())
+
                             "(\"" + soapTagName + "\", 0);\n");
                 }
@@ -947,11 +949,11 @@ public class BeanParamWriter extends Par
                 String soapTagName = attribs[i].getParamNameAsSOAPString();
 
                 c_writer.write(tab2 + "param->" + attribs[i].getParamNameAsMember()
-                        + " = (" + attribs[i].getTypeName()
-                        + "*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_" + attribs[i].getTypeName()
-                        + ", (void*)Axis_Create_" + attribs[i].getTypeName() 
-                        + ", (void*)Axis_Delete_" + attribs[i].getTypeName() 
-                        + ", \"" + soapTagName + "\", Axis_URI_" + attribs[i].getTypeName()
+ ");\n");
+                        + " = (" + CUtils.sanitizeString(attribs[i].getTypeName())
+                        + "*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_" + CUtils.sanitizeString(attribs[i].getTypeName())
+                        + ", (void*)Axis_Create_" + CUtils.sanitizeString(attribs[i].getTypeName())
+                        + ", (void*)Axis_Delete_" + CUtils.sanitizeString(attribs[i].getTypeName())
+                        + ", \"" + soapTagName + "\", Axis_URI_" + CUtils.sanitizeString(attribs[i].getTypeName())
+ ");\n");
             }
 
             if (attribs[i].getChoiceElement() || attribs[i].getAllElement())
@@ -1145,13 +1147,13 @@ public class BeanParamWriter extends Par
                     String fieldName  = "any" + Integer.toString(anyCounter);
                     
                     c_writer.write("\tif (original." + fieldName + " != NULL)\n");
-                    c_writer.write("\t\t" + fieldName + " = new " + attribs[i].getTypeName()
+ "(*(original." + fieldName + "));\n");
+                    c_writer.write("\t\t" + fieldName + " = new " + CUtils.sanitizeString(attribs[i].getTypeName())
+ "(*(original." + fieldName + "));\n");
                 }
                 else if (attribs[i].isArray())
                 {    
                     c_writer.write("\tif (original." + attribs[i].getParamNameAsMember()
+ " != NULL)\n");
                     c_writer.write("\t\t" + attribs[i].getParamNameAsMember() + " = new "

-                            + CUtils.getArrayNameForType(attribs[i].getTypeName()) + "(*original."

+                            + CUtils.sanitizeString(CUtils.getArrayNameForType(attribs[i].getTypeName()))
+ "(*original." 
                             + attribs[i].getParamNameAsMember() + ");\n");
                 }
                 else
@@ -1174,7 +1176,7 @@ public class BeanParamWriter extends Par
                     {
                         c_writer.write("\tif (original." + attribs[i].getParamNameAsMember()
+ " != NULL)\n");
                         c_writer.write("\t\t" + attribs[i].getParamNameAsMember() + " = new
" 
-                                + attribs[i].getTypeName() + "(*(original." 
+                                + CUtils.sanitizeString(attribs[i].getTypeName()) + "(*(original."

                                 + attribs[i].getParamNameAsMember() + "));\n");
                     }
                 }

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java?rev=1427562&r1=1427561&r2=1427562&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
Tue Jan  1 21:06:50 2013
@@ -338,7 +338,7 @@ public class ParmHeaderFileWriter extend
                     c_writer.write("\t");
 
                 // Print out field.
-                c_writer.write(CUtils.resolveWSDL2LanguageNameClashes(paramType) + " " +
paramName + ";\n");
+                c_writer.write(CUtils.sanitizeStringWithSplats(paramType) + " " + paramName
+ ";\n");
             }
             
             // Handle extension 
@@ -346,7 +346,7 @@ public class ParmHeaderFileWriter extend
                 getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib) !=
null)
             {
                 c_writer.write("\t"
-                             + CUtils.sanitizeString(getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib))
+                             + CUtils.sanitizeStringWithSplats(getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib))
                              + " "
                              + extensionBaseAttrib.getParamNameAsMember() + ";\n");
             }
@@ -391,10 +391,10 @@ public class ParmHeaderFileWriter extend
                 c_writer.write("\n");
                 
                 // Generate getter prototype
-                c_writer.write("\t" + CUtils.resolveWSDL2LanguageNameClashes(paramType) +
" get" + methodName + "();\n");
+                c_writer.write("\t" + CUtils.sanitizeStringWithSplats(paramType) + " get"
+ methodName + "();\n");
                 
                 // Generate setter prototype - need to consider deep copies
-                c_writer.write("\t" + "void set" + methodName + "(" + CUtils.resolveWSDL2LanguageNameClashes(paramType)
+ " InValue");
+                c_writer.write("\t" + "void set" + methodName + "(" + CUtils.sanitizeStringWithSplats(paramType)
+ " InValue");
                 
                 Type type = attribs[i].getType();
                 boolean isPointerType;                
@@ -526,13 +526,13 @@ public class ParmHeaderFileWriter extend
                 Type theType = attribs[i].getType();
                 
                 if (theType.isRestriction() && !CUtils.isPrimitiveType(basicType))
-                    typeSet.add(basicType);
+                    typeSet.add(CUtils.sanitizeString(basicType));
                 else if (!attribs[i].isSimpleType() && !attribs[i].isAnyElement())
                 {
                     if ((attribs[i].isArray()) && !theType.isSimpleType())
-                        typeSet.add(CUtils.getArrayNameForType(basicType));
+                        typeSet.add(CUtils.sanitizeString(CUtils.getArrayNameForType(basicType)));
     
-                    typeSet.add(basicType);
+                    typeSet.add(CUtils.sanitizeString(basicType));
                 }
             }
             
@@ -559,7 +559,7 @@ public class ParmHeaderFileWriter extend
                 // Do not want to include the header file we are generating!
                 String includeFile = itr.next().toString();
                 if (!includeFile.equals(c_classname))                
-                    c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(includeFile)
+ CUtils.getHeaderFileExtension() + "\"\n");
+                    c_writer.write("#include \"" + includeFile + CUtils.getHeaderFileExtension()
+ "\"\n");
             }
 
             c_writer.write("\n");
@@ -579,7 +579,7 @@ public class ParmHeaderFileWriter extend
                         !(attribs[i].isSimpleType() || attribs[i].getType().isSimpleType())
                         && !attribs[i].isAnyElement())
 				{
-                    typeSet.add(attribs[i].getTypeName());
+                    typeSet.add(CUtils.sanitizeString(attribs[i].getTypeName()));
                 } 
             }
             

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=1427562&r1=1427561&r2=1427562&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 Tue Jan  1
21:06:50 2013
@@ -647,10 +647,10 @@ public class WSDLInfo
             {
                 newqn = CUtils.getArrayQNameForType(qn);
                 if (newqn == null)
-                    newqn = new QName(type.getQName().getNamespaceURI(), CUtils.resolveWSDL2LanguageNameClashes(qn.getLocalPart())
+ "_Array" + typeCounter++);      
+                    newqn = new QName(type.getQName().getNamespaceURI(), CUtils.sanitizeString(qn.getLocalPart())
+ "_Array" + typeCounter++);      
             }
             else
-                newqn = new QName(type.getQName().getNamespaceURI(), CUtils.resolveWSDL2LanguageNameClashes(qn.getLocalPart())
+ "_Array");
+                newqn = new QName(type.getQName().getNamespaceURI(), CUtils.sanitizeString(qn.getLocalPart())
+ "_Array");
             
             // type is a inbuilt type or an already created type?
             typedata = c_typeMap.getType(newqn);
@@ -672,7 +672,7 @@ public class WSDLInfo
                     {
                         do 
                         {
-                            newqn = new QName(type.getQName().getNamespaceURI(), CUtils.resolveWSDL2LanguageNameClashes(qn.getLocalPart())
 + "_Array" + typeCounter++);
+                            newqn = new QName(type.getQName().getNamespaceURI(), CUtils.sanitizeString(qn.getLocalPart())
 + "_Array" + typeCounter++);
                             typedata = c_typeMap.getType(newqn);
                         }
                         while (typedata != null && !typedata.isArray());



Mime
View raw message