You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2005/11/25 16:06:32 UTC

svn commit: r348962 - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java

Author: prestonf
Date: Fri Nov 25 07:06:28 2005
New Revision: 348962

URL: http://svn.apache.org/viewcvs?rev=348962&view=rev
Log:
Update to name.  Was putting '_' after name on get set methods.

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.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=348962&r1=348961&r2=348962&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 Nov 25 07:06:28 2005
@@ -155,15 +155,25 @@
                 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].isArray())
                 {
                     writer.write("\n" + properParamName + " * " + classname
-                            + "::get" + parameterName + "()\n{\n");
+                            + "::get" + methodName + "()\n{\n");
 
                     writer.write("\t" + "return " + parameterName + " ; \n}\n");
 
                     writer.write("\n" + "void " + classname + "::set"
-                            + parameterName + "(" + properParamName
+                            + methodName + "(" + properParamName
                             + " * pInValue)\n{\n");
 
                     writer.write("\tif(" + parameterName + " == NULL)\n");
@@ -187,12 +197,12 @@
 	                    }
 	                    
 	                    writer.write("\n" + properParamName + " * " + classname
-	                            + "::get" + parameterName + "()\n{\n");
+	                            + "::get" + methodName + "()\n{\n");
 	
 	                    writer.write("\t" + "return " + parameterName + " ; \n}\n");
 	
 	                    writer.write("\n" + "void " + classname + "::set"
-	                            + parameterName + "(" + properParamName
+	                            + methodName + "(" + properParamName
 	                            + " * pInValue)\n{\n");
 	
 	                    writer.write("\t" + parameterName + " = pInValue ; \n");
@@ -220,7 +230,6 @@
 	                     * Dushshantha: Write getter
 	                     */
 	
-	
 	                    if( methodName.endsWith( "_"))
 	                    {
 	                        String localMethodName = methodName.substring( 0, methodName.length() - 1);
@@ -230,7 +239,7 @@
 	                            methodName = localMethodName; 
 	                        }
 	                    }
-	                    
+                    
 	                    if (attribs[i].isAnyType())
 	                    {                    	
 	                    	anyCounter += 1;
@@ -1378,15 +1387,16 @@
     //	 FJP Nillable vv
     protected boolean isElementNillable(int index)
     {
-        ElementInfo ei = type.getElementForElementName(attribs[index].getParamName());
+        //ElementInfo ei = type.getElementForElementName(attribs[index].getParamName());
         boolean bNillable = false;
 
-        if (ei != null
-        		&& attribs[index].isSimpleType()
+        if (//ei != null
+        		// && 
+        		attribs[index].isSimpleType()
         		&& !attribs[index].isArray()
                 && !CUtils.isPointerType(attribs[index].getTypeName()) )
         {
-            bNillable = ei.getNillable();
+            bNillable = attribs[index].isNillable();
         }
 
         return bNillable;