axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1424208 - in /axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws: ./ c/ cpp/ info/
Date Wed, 19 Dec 2012 23:03:42 GMT
Author: nadiramra
Date: Wed Dec 19 23:03:41 2012
New Revision: 1424208

URL: http://svn.apache.org/viewvc?rev=1424208&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/ArrayParamHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.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/ClientStubHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.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/ArrayParamHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.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/ClientStubHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.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=1424208&r1=1424207&r2=1424208&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 Wed Dec 19 23:03:41
2012
@@ -1115,10 +1115,14 @@ public class CUtils 
         for(i=0; i < Array.getLength(c_invalidCChars); i++)
             sanitisedName = sanitisedName.replace((char)c_invalidCChars[i], '_'); 
         
+        // Now ensure that string does not conflict with language constructs
+        sanitisedName = resolveWSDL2LanguageNameClashes(sanitisedName);
+        
         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. 
      * When generating classes, we want to use the simplist name, which is the name after

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
Wed Dec 19 23:03:41 2012
@@ -101,7 +101,7 @@ public class ArrayParamHeaderWriter exte
                        + "\tstruct " + attribs[0].getTypeName() + "Tag **   m_Array;\n"
                        + "\tint   m_Size;\n"
                        + "\tAXISC_XSDTYPE   m_Type;\n"
-                       + "} " + c_classname + ";\n"); 
+                       + "} " + CUtils.resolveWSDL2LanguageNameClashes(c_classname) + ";\n");

             
             c_writer.write("\n");
             c_writer.write("/* *********************************************************************
*/\n");

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java Wed Dec
19 23:03:41 2012
@@ -73,7 +73,7 @@ public class ArrayParamWriter extends Pa
             // include header file for the contained type
             QName qname = CUtils.getArrayType(type).getName();
             if (!CUtils.isSimpleType(qname))
-                c_writer.write("#include \"" + attribs[0].getTypeName() + CUtils.getHeaderFileExtension()
+ "\"\n");
+                c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(attribs[0].getTypeName())
+ CUtils.getHeaderFileExtension() + "\"\n");
             c_writer.write("\n");
             
             c_writer.write("\n");

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=1424208&r1=1424207&r2=1424208&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 Wed Dec
19 23:03:41 2012
@@ -692,7 +692,7 @@ public class BeanParamWriter extends Par
                     
                     c_writer.write(tab2 + "{\n"); // start local scope
                     
-                    c_writer.write(tab2 + "\t" + attribs[i].getTypeName() + " * "
+                    c_writer.write(tab2 + "\t" + CUtils.resolveWSDL2LanguageNameClashes(attribs[i].getTypeName())
+ " * "
                         + attribs[i].getParamNameAsMember() + " = " 
                         + "axiscSoapDeSerializer"
                         + CUtils.getDeserializerMethodName(attribs[i].getTypeName(), attribs[i].isAttribute())


Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java
Wed Dec 19 23:03:41 2012
@@ -236,7 +236,7 @@ public class ClientStubHeaderWriter exte
             Iterator itr = typeSet.iterator();
             while (itr.hasNext())
             {
-                c_writer.write("#include \"" + itr.next().toString() + CUtils.getHeaderFileExtension()+"\"\n");
+                c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(itr.next().toString())
+ CUtils.getHeaderFileExtension()+"\"\n");
             }
             c_writer.write("\n");
         }

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java Wed Dec
19 23:03:41 2012
@@ -129,7 +129,7 @@ public class ClientStubWriter extends CF
             c_writer.write("#include <string.h>\n");
             c_writer.write("\n");
             
-            c_writer.write("#include \"" + c_classname + CUtils.getHeaderFileExtension()
+ "\"\n");
+            c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(c_classname)
+ CUtils.getHeaderFileExtension() + "\"\n");
             c_writer.write("\n");
             c_writer.write("#include <axis/client/Stub.h>\n");
             c_writer.write("#include <axis/client/Call.h>\n");

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java Wed Dec
19 23:03:41 2012
@@ -121,7 +121,7 @@ public abstract class ParamCFileWriter e
             c_writer.write("#include <string.h>\n");
             c_writer.write("\n");
             
-            c_writer.write("#include \"" + this.c_classname + CUtils.getHeaderFileExtension()
+ "\"\n");
+            c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(this.c_classname)
+ CUtils.getHeaderFileExtension() + "\"\n");
             c_writer.write("\n");
 
             c_writer.write("#include <axis/client/Stub.h>\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=1424208&r1=1424207&r2=1424208&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 Wed
Dec 19 23:03:41 2012
@@ -289,7 +289,7 @@ public class ParmHeaderFileWriter extend
                 }
 
                 // Print out field.
-                c_writer.write("\t" + paramType + " " + paramName + ";\n");
+                c_writer.write("\t" + CUtils.resolveWSDL2LanguageNameClashes(paramType) +
" " + paramName + ";\n");
             }
             
             if (extensionBaseAttrib != null &&
@@ -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 \"" + includeFile + CUtils.getHeaderFileExtension()
+ "\"\n");
+                   c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(includeFile)
+ CUtils.getHeaderFileExtension() + "\"\n");
             }
 
             c_writer.write("\n");

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java
Wed Dec 19 23:03:41 2012
@@ -66,7 +66,7 @@ public class ArrayParamHeaderWriter exte
             QName qname = CUtils.getArrayType(type).getName();
 
             if (!CUtils.isSimpleType(qname))
-                c_writer.write("#include \""+ attribs[0].getTypeName() + ".hpp\"\n");
+                c_writer.write("#include \""+ CUtils.resolveWSDL2LanguageNameClashes(attribs[0].getTypeName())
+ ".hpp\"\n");
 
             c_writer.write("#include <axis/AxisUserAPI.hpp>\n\n");
 

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java Wed
Dec 19 23:03:41 2012
@@ -53,7 +53,7 @@ public class ArrayParamWriter extends Pa
             c_writer = new BufferedWriter(new FileWriter(getFilePath(false), false));
             
             writeClassComment();            
-            c_writer.write("#include \"" + c_classname + ".hpp\"\n\n");
+            c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(c_classname)
+ ".hpp\"\n\n");
             this.writeMethods();
             c_writer.flush();
             c_writer.close();

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=1424208&r1=1424207&r2=1424208&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 Wed
Dec 19 23:03:41 2012
@@ -131,7 +131,7 @@ public class BeanParamWriter extends Par
                 CUtils.printMethodComment(c_writer, "Getter method for class member field
" 
                         + parameterName + ".");
                 
-                c_writer.write(properParamType + asterisk + c_classname
+                c_writer.write(CUtils.resolveWSDL2LanguageNameClashes(properParamType) +
asterisk + c_classname
                         + "::\nget" + methodName + "()\n{\n");
 
                 c_writer.write("\t" + "return " + parameterName + "; \n}\n");
@@ -165,7 +165,7 @@ public class BeanParamWriter extends Par
                 {
                     // Setter method
                     c_writer.write("void " + c_classname + "::\nset"
-                            + methodName + "(" + properParamType  
+                            + methodName + "(" + CUtils.resolveWSDL2LanguageNameClashes(properParamType)
 
                             + " pInValue, bool deep, bool makeCopy)\n{\n");
                     
                     if (attribs[i].getChoiceElement())
@@ -183,7 +183,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 " + type + "();\n");
+                    c_writer.write("\t\t\t" + parameterName + " = new " + CUtils.resolveWSDL2LanguageNameClashes(type)
+ "();\n");
 
                     c_writer.write("\t\t\t*" + parameterName + " = *pInValue;\n");
                     c_writer.write("\t\t}\n");
@@ -198,7 +198,7 @@ public class BeanParamWriter extends Par
                 else
                 {
                     c_writer.write("void " + c_classname + "::\nset"
-                            + methodName + "(" + properParamType + " InValue");
+                            + methodName + "(" + CUtils.resolveWSDL2LanguageNameClashes(properParamType)
+ " InValue");
                                         
                     Type attributeType = attribs[i].getType();
                     
@@ -250,7 +250,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 " + type + "();\n");
+                        c_writer.write("\t\t\t" + parameterName + " = new " + CUtils.resolveWSDL2LanguageNameClashes(type)
+ "();\n");
                         c_writer.write("\t\t\t*" + parameterName + " = *InValue;\n");
                         c_writer.write("\t\t}\n");
                         c_writer.write("\t\telse\n");
@@ -907,13 +907,13 @@ public class BeanParamWriter extends Par
                 
                 if( isPointerType)
                 {
-                    c_writer.write(tab2 + typeName + " pValue" + i + " = pIWSDZ->" +
+                    c_writer.write(tab2 + CUtils.resolveWSDL2LanguageNameClashes(typeName)
+ " pValue" + i + " = pIWSDZ->" +
                             CUtils.getDeserializerMethodName(baseTypeName, attribs[i].isAttribute())
+
                             "(\"" + soapTagName + "\", 0);\n");
                 }
                 else
                 {
-                    c_writer.write(tab2 + typeName + " * pValue" + i + " = pIWSDZ->" +
+                    c_writer.write(tab2 + CUtils.resolveWSDL2LanguageNameClashes(typeName)
+ " * pValue" + i + " = pIWSDZ->" +
                             CUtils.getDeserializerMethodName(baseTypeName, attribs[i].isAttribute())
+
                             "(\"" + soapTagName + "\", 0);\n");
                 }

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
Wed Dec 19 23:03:41 2012
@@ -217,7 +217,7 @@ public class ClientStubHeaderWriter exte
             Iterator itr = typeSet.iterator();
             while (itr.hasNext())
             {
-                c_writer.write("#include \"" + itr.next().toString() + CUtils.getHeaderFileExtension()
+ "\"\n");
+                c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(itr.next().toString())
+ CUtils.getHeaderFileExtension() + "\"\n");
             }
             
             //Method to print the Fault Exception headers

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java Wed
Dec 19 23:03:41 2012
@@ -152,7 +152,7 @@ public class ClientStubWriter extends CP
                         + CUtils.getHeaderFileExtension() + "\"\n\n");
             }
             else
-                c_writer.write("#include \"" + c_classname + CUtils.getHeaderFileExtension()
+ "\"\n\n");
+                c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(c_classname)
+ CUtils.getHeaderFileExtension() + "\"\n\n");
 
             c_writer.write("#include <axis/AxisWrapperAPI.hpp>\n");
             c_writer.write ("#include <axis/Axis.hpp>\n");

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java?rev=1424208&r1=1424207&r2=1424208&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java Wed
Dec 19 23:03:41 2012
@@ -109,7 +109,7 @@ public abstract class ParamCPPFileWriter
             c_writer.write("#include <axis/UnknownElementException.hpp>\n");
             c_writer.write("#include <axis/AxisWrapperAPI.hpp>\n");
             c_writer.write("#include <axis/Axis.hpp>\n\n");
-            c_writer.write("#include \"" + this.c_classname + CUtils.getHeaderFileExtension()
+ "\"\n");
+            c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(this.c_classname)
+ CUtils.getHeaderFileExtension() + "\"\n");
         }
         catch (IOException e)
         {

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=1424208&r1=1424207&r2=1424208&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
Wed Dec 19 23:03:41 2012
@@ -338,7 +338,7 @@ public class ParmHeaderFileWriter extend
                     c_writer.write("\t");
 
                 // Print out field.
-                c_writer.write(paramType + " " + paramName + ";\n");
+                c_writer.write(CUtils.resolveWSDL2LanguageNameClashes(paramType) + " " +
paramName + ";\n");
             }
             
             // Handle extension 
@@ -391,10 +391,10 @@ public class ParmHeaderFileWriter extend
                 c_writer.write("\n");
                 
                 // Generate getter prototype
-                c_writer.write("\t" + paramType + " get" + methodName + "();\n");
+                c_writer.write("\t" + CUtils.resolveWSDL2LanguageNameClashes(paramType) +
" get" + methodName + "();\n");
                 
                 // Generate setter prototype - need to consider deep copies
-                c_writer.write("\t" + "void set" + methodName + "(" + paramType + " InValue");
+                c_writer.write("\t" + "void set" + methodName + "(" + CUtils.resolveWSDL2LanguageNameClashes(paramType)
+ " InValue");
                 
                 Type type = attribs[i].getType();
                 boolean isPointerType;                
@@ -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 \"" + includeFile + CUtils.getHeaderFileExtension()
+ "\"\n");
+                    c_writer.write("#include \"" + CUtils.resolveWSDL2LanguageNameClashes(includeFile)
+ CUtils.getHeaderFileExtension() + "\"\n");
             }
 
             c_writer.write("\n");

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=1424208&r1=1424207&r2=1424208&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 Dec 19
23:03:41 2012
@@ -647,10 +647,10 @@ public class WSDLInfo
             {
                 newqn = CUtils.getArrayQNameForType(qn);
                 if (newqn == null)
-                    newqn = new QName(type.getQName().getNamespaceURI(), qn.getLocalPart()
+ "_Array" + typeCounter++);      
+                    newqn = new QName(type.getQName().getNamespaceURI(), CUtils.resolveWSDL2LanguageNameClashes(qn.getLocalPart())
+ "_Array" + typeCounter++);      
             }
             else
-                newqn = new QName(type.getQName().getNamespaceURI(), qn.getLocalPart() +
"_Array");
+                newqn = new QName(type.getQName().getNamespaceURI(), CUtils.resolveWSDL2LanguageNameClashes(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(), qn.getLocalPart()
 + "_Array" + typeCounter++);
+                            newqn = new QName(type.getQName().getNamespaceURI(), CUtils.resolveWSDL2LanguageNameClashes(qn.getLocalPart())
 + "_Array" + typeCounter++);
                             typedata = c_typeMap.getType(newqn);
                         }
                         while (typedata != null && !typedata.isArray());



Mime
View raw message