axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdinap...@apache.org
Subject svn commit: r356464 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal: BeanParamWriter.java ParmHeaderFileWriter.java
Date Tue, 13 Dec 2005 04:12:01 GMT
Author: cdinapala
Date: Mon Dec 12 20:11:54 2005
New Revision: 356464

URL: http://svn.apache.org/viewcvs?rev=356464&view=rev
Log:
Enable the new memory management concept(keep the deep copy of objects) for "choice" and "all"
constructs. 

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/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=356464&r1=356463&r2=356464&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
Mon Dec 12 20:11:54 2005
@@ -18,6 +18,7 @@
 /**
  * @author Srinath Perera(hemapani@openource.lk)
  * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
+ * @author Chinthana Dinapala(cdinapala@virtusa.com)
  */
 
 package org.apache.axis.wsdl.wsdl2ws.cpp.literal;
@@ -243,6 +244,18 @@
 	                            }
 	                        }
 	                    }
+	                    if (attribs[i].getAllElement())
+	                    {
+	                        for (int j = 0; j < attribs.length; j++)
+	                        {
+	                            if ((attribs[j].getAllElement()) && (j != i))
+	                            {
+	                                writer.write("\t"
+	                                        + attribs[j].getParamNameWithoutSymbols()
+	                                        + " = NULL ; \n");
+	                            }
+	                        }
+	                    }
 	
 	                    writer.write("}\n");
 	                } 
@@ -1195,7 +1208,7 @@
                 }
                 else
                 {
-	                if (attribs[i].isSimpleType() && (CUtils.isPointerType(attribs[i].getTypeName())
|| attribs[i].isOptional() || attribs[i].isNillable()))
+	                if (attribs[i].isSimpleType() && (CUtils.isPointerType(attribs[i].getTypeName())
|| attribs[i].isOptional() || attribs[i].isNillable() || attribs[i].getChoiceElement() ||
attribs[i].getAllElement()))
 	                {
 	                    writer.write("\t" + attribs[i].getParamName() + " = NULL;\n");
 	                    String methodName = attribs[i].getParamNameWithoutSymbols();
@@ -1273,7 +1286,7 @@
                 	            + "= NULL;\n");
                 	}
                 }
-                else if (isElementNillable(i) || isElementOptional(i))
+                else if (isElementNillable(i) || isElementOptional(i) || attribs[i].getChoiceElement()
|| attribs[i].getAllElement())
                 {
                     writer.write("\t" + attribs[i].getParamNameAsMember()
                             + " = NULL;\n");
@@ -1348,7 +1361,7 @@
                     writer.write("\t\t" + name + " = NULL;\n");
                     writer.write("\t}\n");
                 }
-                else if (CUtils.isPointerType(typename) || isElementNillable(i) || isElementOptional(i))
+                else if (CUtils.isPointerType(typename) || isElementNillable(i) || isElementOptional(i)
|| attribs[i].getChoiceElement() || attribs[i].getAllElement())
                 {
                     // found pointer type
                     writer.write("\tif (" + name + " != NULL)\n");

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=356464&r1=356463&r2=356464&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
Mon Dec 12 20:11:54 2005
@@ -19,6 +19,7 @@
  * @author Srinath Perera(hemapani@openource.lk)
  * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
  * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
+ * @author Chinthana Dinapala(cdinapala@virtusa.com)
  */
 
 package org.apache.axis.wsdl.wsdl2ws.cpp.literal;
@@ -122,7 +123,7 @@
             boolean foundDeepCopyType = false;
         	for (int i = 0 ; i < attribs.length ; i++)
         	{
-        	    if (CUtils.isSimpleType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]))
&& !attribs[i].isArray() &&(isElementNillable(i) || isElementOptional(i) ||
CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]))))
+        	    if (CUtils.isSimpleType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]))
|| attribs[i].getChoiceElement() || attribs[i].getAllElement() && !attribs[i].isArray()
&&(isElementNillable(i) || isElementOptional(i) || CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]))))
         	    {
         	        if (!foundDeepCopyType)
         	        {



Mime
View raw message