axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1351400 - in /axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws: c/ c/literal/ cpp/ cpp/literal/ info/
Date Mon, 18 Jun 2012 16:19:23 GMT
Author: nadiramra
Date: Mon Jun 18 16:19:22 2012
New Revision: 1351400

URL: http://svn.apache.org/viewvc?rev=1351400&view=rev
Log:
AXISCPP-1087 Functions in generated classes contains invalid character 

Modified:
    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/literal/ClientStubHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.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/ServiceHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java

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=1351400&r1=1351399&r2=1351400&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
Mon Jun 18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.c;
 
 import java.io.IOException;
@@ -130,7 +125,7 @@ public class ClientStubHeaderWriter exte
                 }
                 
                 //write return type
-                c_writer.write(minfo.getMethodname() + "(AXISCHANDLE pStub");           
    
+                c_writer.write(minfo.getSanitizedMethodName() + "(AXISCHANDLE pStub");  
             
 
                 //write parameter names 
                 Iterator params = minfo.getInputParameterTypes().iterator();

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=1351400&r1=1351399&r2=1351400&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 Mon Jun
18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Kanchana Welagedara(kanchana@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.c;
 
 import java.io.IOException;
@@ -151,15 +146,11 @@ public class ClientStubWriter extends CF
 
     /**
      * This method genarate methods that wraps the each method of the service
-     * @param methodName
-     * @param params
-     * @param outparam
+     * @param minfo
      * @throws IOException
      */
-
     public void writeMethodInWrapper(MethodInfo minfo)  throws WrapperFault, IOException
     {
-
         boolean isAllTreatedAsOutParams = false;
         ParameterInfo returntype = null;
         int noOfOutParams = minfo.getOutputParameterTypes().size();
@@ -172,7 +163,6 @@ public class ClientStubWriter extends CF
         
         Collection params = minfo.getInputParameterTypes();
 
-        String methodName = minfo.getMethodname();
         Type retType = null;
         boolean returntypeissimple = false;
         boolean returntypeisarray = false;
@@ -190,7 +180,7 @@ public class ClientStubWriter extends CF
             }
         }
 
-        CUtils.printMethodComment(c_writer, "This function wraps the service method " + methodName
+ ".");
+        CUtils.printMethodComment(c_writer, "This function wraps the service method " + minfo.getMethodname()
+ ".");
         
         //method signature
         String paramTypeName;
@@ -212,7 +202,7 @@ public class ClientStubWriter extends CF
 
         }
         
-        c_writer.write(" " + methodName + "(AXISCHANDLE stub");
+        c_writer.write(" " + minfo.getSanitizedMethodName() + "(AXISCHANDLE stub");
         ArrayList paramsB = (ArrayList) params;
         for (int i = 0; i < paramsB.size(); i++)
         {

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java
Mon Jun 18 16:19:22 2012
@@ -15,10 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
 package org.apache.axis.wsdl.wsdl2ws.c.literal;
 
 import java.io.IOException;
@@ -94,11 +90,11 @@ public class ClientStubHeaderWriter
                 
                 // write operation prototype
                 // Operation name may conflict with a C type, so if it does, need to make
unique.
-                String methodName = minfo.getMethodname();
+                String methodName = minfo.getSanitizedMethodName();
                 int ii = 0;
                 while (wscontext.getTypemap().doesTypeExist(methodName))
                 {
-                    methodName = minfo.getMethodname() + ii++;
+                    methodName = minfo.getSanitizedMethodName() + ii++;
                 }
                 c_writer.write(methodName + "(AXISCHANDLE pStub");                
 

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
Mon Jun 18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Kanchana Welagedara(kanchana@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.c.literal;
 
 import java.io.IOException;
@@ -119,11 +114,11 @@ public class ClientStubWriter
             c_writer.write(outparamType + "*");
    
         // Method name may conflict with a C type, so if it does, need to make method unique.
-        String methodName = minfo.getMethodname();
+        String methodName = minfo.getSanitizedMethodName();
         int ii = 0;
         while (wscontext.getTypemap().doesTypeExist(methodName))
         {
-            methodName = minfo.getMethodname() + ii++;
+            methodName = minfo.getSanitizedMethodName() + ii++;
         }
 
         c_writer.write(" " + methodName + "(AXISCHANDLE stub");

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=1351400&r1=1351399&r2=1351400&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
Mon Jun 18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.cpp;
 
 import java.io.IOException;
@@ -136,7 +131,7 @@ public class ClientStubHeaderWriter exte
                     c_writer.write("\tSTORAGE_CLASS_INFO void ");
                 }                
                 //write return type
-                c_writer.write(minfo.getMethodname() + "(");
+                c_writer.write(minfo.getSanitizedMethodName() + "(");
 
                 //write parameter names 
                 Iterator params = minfo.getInputParameterTypes().iterator();

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=1351400&r1=1351399&r2=1351400&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 Mon
Jun 18 16:19:22 2012
@@ -195,7 +195,6 @@ public class ClientStubWriter extends CP
         
         Collection params = minfo.getInputParameterTypes();
 
-        String methodName = minfo.getMethodname();
         Type retType = null;
         boolean returntypeissimple = false;
         boolean returntypeisarray = false;
@@ -228,7 +227,7 @@ public class ClientStubWriter extends CP
         // Generate method prototype
         //============================================================================= 
      
 
-        CUtils.printMethodComment(c_writer, "This method wraps the service method " + methodName
+ ".");
+        CUtils.printMethodComment(c_writer, "This method wraps the service method " + minfo.getMethodname()
+ ".");
 
         //method signature
         String paramTypeName;
@@ -247,7 +246,7 @@ public class ClientStubWriter extends CP
             else
                 c_writer.write (outparamType + "*");
 
-        c_writer.write(" " + c_classname + "::\n" + methodName + "(");
+        c_writer.write(" " + c_classname + "::\n" + minfo.getSanitizedMethodName() + "(");
         ArrayList paramsB = (ArrayList) params;
         for (int i = 0; i < paramsB.size(); i++)
         {
@@ -750,7 +749,6 @@ public class ClientStubWriter extends CP
         Iterator paramsFault = minfo.getFaultType ().iterator ();
         String faultInfoName = null;
         boolean flag = false;
-        int j = 0;
         if (!paramsFault.hasNext ())
             writeOtherFaultException("");
         else
@@ -761,13 +759,12 @@ public class ClientStubWriter extends CP
         
         while (paramsFault.hasNext ())
         {
-            j = j + 1;
             FaultInfo info = (FaultInfo) paramsFault.next ();
             faultInfoName = info.getFaultInfo ();
     
-            // FJP - D0004 > Looking through the list of attributes for the 'error' part
of
-            //               the fault message.  If found, update the faultInfoName with
the
-            //               'localname' of the qname of the attribute.                 
       
+            // Looking through the list of attributes for the 'error' part of
+            // the fault message.  If found, update the faultInfoName with the
+            // 'localname' of the qname of the attribute.                         
             Iterator infoArrayListIterator = info.getParams ().iterator ();
             while (infoArrayListIterator.hasNext ())
             {
@@ -779,8 +776,7 @@ public class ClientStubWriter extends CP
                         faultInfoName = paramInfo.getElementName ().getLocalPart ();
                         break;
                     }
-            }
-            // FJP - D0004 <                            
+            }                          
     
             ArrayList paramInfo = info.getParams ();
             boolean printedIF = false;

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
Mon Jun 18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.cpp;
 
 import java.io.IOException;
@@ -161,7 +156,7 @@ public class ServiceHeaderWriter extends
                     }
                 }
                 //write return type
-                c_writer.write(minfo.getMethodname() + "(");
+                c_writer.write(minfo.getSanitizedMethodName() + "(");
                 //write parameter names 
                 
                 boolean hasInputParms = false;

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java Mon Jun
18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.cpp;
 
 import java.io.IOException;
@@ -178,7 +173,7 @@ public class ServiceWriter extends CPPCl
                         c_writer.write("void ");
                     }
                 }
-                c_writer.write(c_classname + "::\n" + minfo.getMethodname() + "(");
+                c_writer.write(c_classname + "::\n" + minfo.getSanitizedMethodName() + "(");
                 //write parameter names 
                 
                 boolean hasInputParms = false;

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java Mon
Jun 18 16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.cpp;
 
 import java.io.IOException;
@@ -127,7 +122,7 @@ public class WrapHeaderWriter extends He
             {
                 minfo = (MethodInfo) methods.get(i);
                 c_writer.write(
-                    "\tint " + minfo.getMethodname() + "(void* pMsg);");
+                    "\tint " + minfo.getSanitizedMethodName() + "(void* pMsg);");
                 c_writer.write("\n");
             }
 

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java Mon Jun 18
16:19:22 2012
@@ -15,11 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.cpp;
 
 import java.io.IOException;
@@ -182,7 +177,7 @@ public class WrapWriter extends CPPClass
             //if conditions (if parts)		
             c_writer.write(
                 "\tif( (0 == strcmp(method, \"" + minfo.getInputMessage().getLocalPart()
+ "\")) || (0 == strcmp(method, \"" + minfo.getMethodname() + "\")) )\n");
-            c_writer.write("\t\treturn " + minfo.getMethodname() + "(mc);\n");
+            c_writer.write("\t\treturn " + minfo.getSanitizedMethodName() + "(mc);\n");
             //(else if parts)
             if (methods.size() > 1)
             {
@@ -191,7 +186,7 @@ public class WrapWriter extends CPPClass
                     minfo = (MethodInfo) methods.get(i);
                     c_writer.write(
                         "\telse if ( (0 == strcmp(method, \"" + minfo.getInputMessage().getLocalPart()
+ "\")) || (0 == strcmp(method, \"" + minfo.getMethodname() + "\")) )\n");
-                    c_writer.write("\t\treturn " + minfo.getMethodname() + "(mc);\n");
+                    c_writer.write("\t\treturn " + minfo.getSanitizedMethodName() + "(mc);\n");
                 }
             }
             //(else part)
@@ -236,7 +231,6 @@ public class WrapWriter extends CPPClass
             }
         }
         Collection params = minfo.getInputParameterTypes();
-        String methodName = minfo.getMethodname();
         Type retType = null;
         String outparamType = null;
         String outparamTypeName = null;
@@ -264,7 +258,7 @@ public class WrapWriter extends CPPClass
         c_writer.write(" */\n");
         //method signature
         c_writer.write(
-            "int " + c_classname + "::\n" + methodName + "(void* pMsg)\n{\n");
+            "int " + c_classname + "::\n" + minfo.getSanitizedMethodName() + "(void* pMsg)\n{\n");
         c_writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
         c_writer.write("\tint nStatus;\n");
         c_writer.write("\tIWrapperSoapSerializer* pIWSSZ = NULL;\n");
@@ -509,7 +503,7 @@ public class WrapWriter extends CPPClass
         	}
             c_writer.write(" ret = "
                     + "pWs->"
-                    + methodName
+                    + minfo.getSanitizedMethodName()
                     + "(");
             if (0 < paramsB.size())
             {
@@ -528,7 +522,7 @@ public class WrapWriter extends CPPClass
             	{
             		c_writer.write(
     	                    "\t\treturn pIWSSZ->addOutputParam(\""
-    	                        + methodName
+    	                        + minfo.getMethodname()
     	                        + "Return\", (void*)ret, "
     	                        + CUtils.getXSDEnumeratorForType(outparamTypeName)
     	                        + ");\n");
@@ -537,7 +531,7 @@ public class WrapWriter extends CPPClass
             	{
 	                c_writer.write(
 	                    "\t\treturn pIWSSZ->addOutputParam(\""
-	                        + methodName
+	                        + minfo.getMethodname()
 	                        + "Return\", (void*)&ret, "
 	                        + CUtils.getXSDEnumeratorForType(outparamTypeName)
 	                        + ");\n");
@@ -555,7 +549,7 @@ public class WrapWriter extends CPPClass
                             "\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret,"
                                 + CUtils.getXSDEnumeratorForType(containedType)
                                 + ", \""
-                                + methodName
+                                + minfo.getMethodname()
                                 + "Return\");\n");
                         c_writer.write("\t\tdelete ret;\n");
                         c_writer.write("\t\t return nStatus;\n");
@@ -570,7 +564,7 @@ public class WrapWriter extends CPPClass
                                 + ", (void*) Axis_Delete_"
                                 + containedType
                                 + ", \""
-                                + methodName
+                                + minfo.getMethodname()
                                 + "Return\", Axis_URI_"
                                 + containedType
                                 + ");\n");
@@ -589,7 +583,7 @@ public class WrapWriter extends CPPClass
                             + ", (void*)Axis_Delete_"
                             + outparamTypeName
                             + ", \""
-                            + methodName
+                            + minfo.getMethodname()
                             + "Return\", Axis_URI_"
                             + outparamTypeName
                             + ");\n");
@@ -598,7 +592,7 @@ public class WrapWriter extends CPPClass
         else
             if (isAllTreatedAsOutParams)
             {
-                c_writer.write("\t\tpWs->" + methodName + "(");
+                c_writer.write("\t\tpWs->" + minfo.getSanitizedMethodName() + "(");
                 if (0 < paramsB.size())
                 {
                     for (int i = 0; i < paramsB.size(); i++)
@@ -738,7 +732,7 @@ public class WrapWriter extends CPPClass
             else
             { //method does not return anything
                 /* Invoke the service when return type is void */
-                c_writer.write("\t\tpWs->" + methodName + "(");
+                c_writer.write("\t\tpWs->" + minfo.getSanitizedMethodName() + "(");
                 if (0 < paramsB.size())
                 {
                     for (int i = 0; i < paramsB.size() - 1; i++)

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java
Mon Jun 18 16:19:22 2012
@@ -15,17 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Srinath Perera(hemapani@openource.lk)
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
- */
-
-/*
- * Revision 1.1  2004/05/26 samisa
- * Added Stub base class into code generation
- */
-
 package org.apache.axis.wsdl.wsdl2ws.cpp.literal;
 
 import java.io.IOException;
@@ -86,7 +75,7 @@ public class ClientStubHeaderWriter
                     c_writer.write("\tSTORAGE_CLASS_INFO void ");
                 }
                 //write return type
-                c_writer.write(minfo.getMethodname() + "(");
+                c_writer.write(minfo.getSanitizedMethodName() + "(");
 
                 //write parameter names 
                 boolean hasInputParms = false;

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
Mon Jun 18 16:19:22 2012
@@ -15,12 +15,6 @@
  *   limitations under the License.
  */
 
-/**
- * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
- * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
- */
-
-
 /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
 /* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
 /* ----------------------------------------------------------------   */
@@ -85,7 +79,6 @@ public class ClientStubWriter
             isAllTreatedAsOutParams = true;
 
         Collection params = minfo.getInputParameterTypes();
-        String methodName = minfo.getMethodname();
         Type retType = null;
         boolean returntypeissimple = false;
         boolean returntypeisarray = false;
@@ -118,7 +111,7 @@ public class ClientStubWriter
         // Generate method prototype
         //============================================================================= 
      
 
-        CUtils.printMethodComment(c_writer, "This method wraps the service method " + methodName
+ ".");
+        CUtils.printMethodComment(c_writer, "This method wraps the service method " + minfo.getMethodname()
+ ".");
         
         //method signature
         String paramTypeName;
@@ -137,7 +130,7 @@ public class ClientStubWriter
         else 
             c_writer.write(outparamType + "*");
 
-        c_writer.write (" " + c_classname + "::\n" + methodName + "(");
+        c_writer.write (" " + c_classname + "::\n" + minfo.getSanitizedMethodName() + "(");
         ArrayList paramsB = (ArrayList) params;
         ParameterInfo paramtype = null;
         if (0 < paramsB.size ())

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java Mon
Jun 18 16:19:22 2012
@@ -66,9 +66,8 @@ public class WrapWriter extends org.apac
             returntype = (ParameterInfo) minfo.getOutputParameterTypes().iterator().next();
         else
             isAllTreatedAsOutParams = true;
-
+        
         Collection params = minfo.getInputParameterTypes();
-        String methodName = minfo.getMethodname();
         Type retType = null;
         String outparamType = null;
         boolean returntypeissimple = false;
@@ -106,10 +105,10 @@ public class WrapWriter extends org.apac
             }
         }
         
-        CUtils.printMethodComment(c_writer, "This method wraps the service method " + methodName
+ ".");
+        CUtils.printMethodComment(c_writer, "This method wraps the service method " + minfo.getMethodname()
+ ".");
 
         //method signature
-        c_writer.write("int " + c_classname + "::" + methodName + "(void* pMsg)\n{\n");
+        c_writer.write("int " + c_classname + "::" + minfo.getSanitizedMethodName() + "(void*
pMsg)\n{\n");
         c_writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
         c_writer.write("\tint nStatus;\n\n");
         
@@ -342,7 +341,7 @@ public class WrapWriter extends org.apac
                                             && !(CUtils.isPointerType(retType.getLanguageSpecificName()))))))
                 c_writer.write(" *");
             
-            c_writer.write(" ret = " + "pWs->" + methodName + "(");
+            c_writer.write(" ret = " + "pWs->" + minfo.getSanitizedMethodName() + "(");
             if (0 < paramsB.size())
             {
                 for (int i = 0; i < paramsB.size() - 1; i++)
@@ -429,7 +428,7 @@ public class WrapWriter extends org.apac
         }
         else if (isAllTreatedAsOutParams)
         {
-            c_writer.write("\tpWs->" + methodName + "(");
+            c_writer.write("\tpWs->" + minfo.getSanitizedMethodName() + "(");
             if (0 < paramsB.size())
                 for (int i = 0; i < paramsB.size(); i++)
                     c_writer.write("v" + i + ",");
@@ -560,7 +559,7 @@ public class WrapWriter extends org.apac
         else
         { 
             //method does not return anything Invoke the service when return type is void
-            c_writer.write("\tpWs->" + methodName + "(");
+            c_writer.write("\tpWs->" + minfo.getSanitizedMethodName() + "(");
             if (0 < paramsB.size())
             {
                 for (int i = 0; i < paramsB.size() - 1; i++)

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java?rev=1351400&r1=1351399&r2=1351400&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java Mon Jun
18 16:19:22 2012
@@ -17,7 +17,6 @@
 /**
  * This Class represents a method (operation is wsdl) in a web service 
  * class.
- * @author Srinath Perera(hemapani@opensource.lk)
  */
 package org.apache.axis.wsdl.wsdl2ws.info;
 
@@ -27,10 +26,12 @@ import java.util.Collection;
 import javax.xml.namespace.QName;
 
 import org.apache.axis.wsdl.symbolTable.Parameters;
+import org.apache.axis.wsdl.wsdl2ws.CUtils;
 
 public class MethodInfo
 {
     private String methodname;
+    private String sanitizedMethodName;
     private Parameters operationParameters;
     private ArrayList inputParameters;
     private ArrayList outputParameters;
@@ -47,6 +48,7 @@ public class MethodInfo
     public MethodInfo(String methodname)
     {
         this.methodname = methodname;
+        sanitizedMethodName = CUtils.sanitizeString(methodname);
         inputParameters = new ArrayList(101);
         outputParameters = new ArrayList(101);
         faultType = new ArrayList(102);
@@ -57,6 +59,11 @@ public class MethodInfo
         return methodname;
     }
 
+    public String getSanitizedMethodName()
+    {
+        return sanitizedMethodName;
+    }
+    
     public Collection getInputParameterTypes()
     {
         return this.inputParameters;



Mime
View raw message