axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r327815 - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
Date Sun, 23 Oct 2005 17:36:42 GMT
Author: nadiramra
Date: Sun Oct 23 10:36:40 2005
New Revision: 327815

URL: http://svn.apache.org/viewcvs?rev=327815&view=rev
Log:
AXISCPP-860 - ComplexList test failing

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=327815&r1=327814&r2=327815&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
Sun Oct 23 10:36:40 2005
@@ -89,10 +89,10 @@
                             + typeName
                             + "* param, bool bArray = false, int nSize=0);\n");
                     writer.write("extern int Axis_Serialize_"
-                                    + typeName
-                                    + "("
-                                    + typeName
-                                    + "* param, IWrapperSoapSerializer* pSZ, bool bArray
= false);\n");
+                            + typeName
+                            + "("
+                            + typeName
+                            + "* param, IWrapperSoapSerializer* pSZ, bool bArray = false);\n");
                     writer.write("extern int Axis_GetSize_" + typeName
                             + "();\n\n");
                 } 
@@ -137,7 +137,7 @@
         /**
          * Dushshantha: writing getter
          */
-    	int anyCounter = 0;
+        int anyCounter = 0;
         if (type.isArray())
         {
             return;
@@ -194,7 +194,7 @@
                      * Dushshantha: Write getter
                      */
                 	String methodName = attribs[i].getParamNameWithoutSymbols();
-                	String parameterName = methodName;
+                    String parameterName = methodName;
                     String properParamName = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
 
                     if( methodName.endsWith( "_"))
@@ -215,10 +215,10 @@
                     }
 
                     writer.write("\n"
-                                    + properParamName
-                                    + " " + classname + "::get"
-                                    + methodName
-                                    + "()\n{\n");
+                            + properParamName
+                            + " " + classname + "::get"
+                            + methodName
+                            + "()\n{\n");
 
                     writer.write("\t" + "return "
                             + parameterName
@@ -229,13 +229,13 @@
                      */
 
                     writer.write("\n"
-                                    + "void "
-                                    + classname
-                                    + "::set"
-                                    + methodName
-                                    + "("
-                                    + properParamName
-                                    + " InValue)\n{\n");
+                            + "void "
+                            + classname
+                            + "::set"
+                            + methodName
+                            + "("
+                            + properParamName
+                            + " InValue)\n{\n");
 
                     writer.write("\t" + parameterName
                             + " = InValue ; \n");
@@ -404,7 +404,7 @@
         for (int i = attributeParamCount; i < attribs.length; i++)
         {
             // Dushshantha:
-			// if the attribute is a choice following should do
+		    // if the attribute is a choice following should do
 
             if (attribs[i].getChoiceElement())
             {
@@ -412,7 +412,8 @@
                 {
                     writer.write("\tif");
                     firstIfWritten = true;
-                } else
+                } 
+                else
                 {
                     writer.write("\telse if");
                 }
@@ -465,14 +466,14 @@
                     else
                     {
                         writer.write("\tpSZ->serializeBasicArray((Axis_Array*)(&param->"
-                                        + attribs[i].getParamName()
-                                        + "), Axis_URI_"
-                                        + classname
-                                        + ","
-                                        + CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())
-                                        + ", \""
-                                        + attribs[i].getParamNameAsSOAPElement()
-                                        + "\");\n");
+                                + attribs[i].getParamName()
+                                + "), Axis_URI_"
+                                + classname
+                                + ","
+                                + CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())
+                                + ", \""
+                                + attribs[i].getParamNameAsSOAPElement()
+                                + "\");\n");
                     }
                 }
                 else
@@ -529,9 +530,9 @@
                         if (moreThanOne)
                         {
                             writer.write("\t\t\tsAA"
-                                            + i
-                                            + ".m_Array = (void **)param->infos.m_Array[iCount"
-                                            + i + "];\n");
+                                    + i
+                                    + ".m_Array = (void **)param->infos.m_Array[iCount"
+                                    + i + "];\n");
                         }
                         else
                         {
@@ -639,6 +640,15 @@
             {
                 //if complex type
                 String elm = attribs[i].getParamName();
+                if (elm.lastIndexOf("_Ref") > -1)
+                {
+                    elm = elm.substring(0, elm.lastIndexOf("_Ref"));
+                }
+
+                if (elm.charAt(0) == '_')
+                {
+                    elm = elm.substring(1, elm.length());
+                }
                 
                 if (attribs[i].isReference())
                 {
@@ -1171,7 +1181,7 @@
             writer.write("\t/*do not allocate memory to any pointer members here\n\t because
deserializer will allocate memory anyway. */\n");
             
             int anyCounter = 0;
-            
+
             for (int i = 0; i < attribs.length; i++)
             {
                 if (attribs[i].isArray())
@@ -1212,9 +1222,10 @@
                     	writer.write("\t" + attribs[i].getParamNameAsMember() + Integer.toString(anyCounter)
                                 + "= 0;\n");
                     }
-                	else{
-                	writer.write("\t" + attribs[i].getParamNameAsMember()
-                            + "= 0;\n");
+                	else
+                    {
+                	    writer.write("\t" + attribs[i].getParamNameAsMember()
+                	            + "= 0;\n");
                 	}
                 }
                 else if (isElementNillable(i))



Mime
View raw message