axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r307097 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal: BeanParamWriter.java ParamCPPFileWriter.java ParmHeaderFileWriter.java
Date Fri, 07 Oct 2005 12:19:10 GMT
Author: prestonf
Date: Fri Oct  7 05:19:05 2005
New Revision: 307097

URL: http://svn.apache.org/viewcvs?rev=307097&view=rev
Log:
Part of the fix for AXISCPP-849 and AXIS-850

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParamCPPFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java?rev=307097&r1=307096&r2=307097&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
Fri Oct  7 05:19:05 2005
@@ -189,8 +189,19 @@
                     /**
                      * Dushshantha: Write getter
                      */
-                	String parameterName = attribs[i].getParamNameWithoutSymbols();
+                	String methodName = attribs[i].getParamNameWithoutSymbols();
+                	String parameterName = methodName;
                     String properParamName = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
+
+                    if( methodName.endsWith( "_"))
+                    {
+                        String localMethodName = methodName.substring( 0, methodName.length()
- 1);
+                        
+                        if( localMethodName.equals( classname))
+                        {
+                            methodName = localMethodName; 
+                        }
+                    }
                     
                     if (attribs[i].isAnyType()){                    	
                     	anyCounter += 1;
@@ -200,7 +211,7 @@
                     writer.write("\n"
                                     + properParamName
                                     + " " + classname + "::get"
-                                    + parameterName
+                                    + methodName
                                     + "()\n{\n");
 
                     writer.write("\t" + "return "
@@ -215,7 +226,7 @@
                                     + "void "
                                     + classname
                                     + "::set"
-                                    + parameterName
+                                    + methodName
                                     + "("
                                     + properParamName
                                     + " InValue)\n{\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParamCPPFileWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParamCPPFileWriter.java?rev=307097&r1=307096&r2=307097&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParamCPPFileWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParamCPPFileWriter.java
Fri Oct  7 05:19:05 2005
@@ -127,7 +127,7 @@
     protected String sanitiseClassName( String name)
     {
         String sanitisedName = name;
-        String cRsrvdSymblLst = ".;-";
+        String cRsrvdSymblLst = ".;-&*+/^%";
 
         for( int iRSLCount = 0; iRSLCount < cRsrvdSymblLst.length(); iRSLCount++)
         {
@@ -140,7 +140,7 @@
     protected String sanitiseAttributeName( String name)
     {
         String sanitisedName = name;
-        String cRsrvdSymblLst = ".;-";
+        String cRsrvdSymblLst = ".;-&*+/^%";
 
         for( int iRSLCount = 0; iRSLCount < cRsrvdSymblLst.length(); iRSLCount++)
         {

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java?rev=307097&r1=307096&r2=307097&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
Fri Oct  7 05:19:05 2005
@@ -325,10 +325,23 @@
         {
             return;
         }
+    	
         try
         {
             for (int i = 0; i < attribs.length; i++)
             {
+        		String methodName = attribs[i].getParamNameWithoutSymbols();
+        		
+        		if( methodName.endsWith( "_"))
+                {
+                    String localMethodName = methodName.substring( 0, methodName.length()
- 1);
+                    
+                    if( localMethodName.equals( classname))
+                    {
+                        methodName = localMethodName; 
+                    }
+                }
+            	
 // FJP Nillable vv
                 if (isElementNillable(i))
                 {
@@ -338,14 +351,14 @@
 							.write("\t"
 									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
 									+ " * get"
-									+ attribs[i].getParamNameWithoutSymbols()
+									+ methodName
 									+ Integer.toString(anyCounter)
 									+ "();\n");
 
 						writer
 							.write("\t"
 									+ "void set"
-									+ attribs[i].getParamNameWithoutSymbols()
+									+ methodName
 									+ Integer.toString(anyCounter)
 									+ "("
 									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
@@ -357,12 +370,12 @@
 						writer.write( "\n\t"
                                   + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
                                   + " * get"
-                                  + attribs[i].getParamNameWithoutSymbols()
+                                  + methodName
                                   + "();\n");
 
 						writer.write( "\t"
                                   + "void set"
-                                  + attribs[i].getParamNameWithoutSymbols()
+                                  + methodName
                                   + "("
                                   + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
                                   + " * pInValue);\n");
@@ -377,14 +390,14 @@
 							.write("\t"
 									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
 									+ " get"
-									+ attribs[i].getParamNameWithoutSymbols()
+									+ methodName
 									+ Integer.toString(anyCounter)
 									+ "();\n");
 
 						writer
 							.write("\t"
 									+ "void set"
-									+ attribs[i].getParamNameWithoutSymbols()
+									+ methodName
 									+ Integer.toString(anyCounter)
 									+ "("
 									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
@@ -401,7 +414,7 @@
 						writer.write("\n\t"
                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
                                     + " get"
-                                    + attribs[i].getParamNameWithoutSymbols()
+                                    + methodName
                                     + "();\n");
 
                     /**
@@ -410,7 +423,7 @@
 
 						writer.write("\t"
                                     + "void set"
-                                    + attribs[i].getParamNameWithoutSymbols()
+                                    + methodName
                                     + "("
                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
                                     + " InValue);\n");
@@ -573,7 +586,7 @@
     protected String sanitiseClassName( String name)
     {
         String sanitisedName = name;
-        String cRsrvdSymblLst = ".;-";
+        String cRsrvdSymblLst = ".;-&*+/^%";
 
         for( int iRSLCount = 0; iRSLCount < cRsrvdSymblLst.length(); iRSLCount++)
         {
@@ -586,7 +599,7 @@
     protected String sanitiseAttributeName( String name)
     {
         String sanitisedName = name;
-        String cRsrvdSymblLst = ".;-";
+        String cRsrvdSymblLst = ".;-&*+/^%";
 
         for( int iRSLCount = 0; iRSLCount < cRsrvdSymblLst.length(); iRSLCount++)
         {



Mime
View raw message