axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r307253 - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
Date Sat, 08 Oct 2005 04:10:18 GMT
Author: nadiramra
Date: Fri Oct  7 21:10:15 2005
New Revision: 307253

URL: http://svn.apache.org/viewcvs?rev=307253&view=rev
Log:
Casting of a return object of class AXIS_ARRAY not correct.

In the code, an attempt is made to cast the AXIS_ARRAY to a 
reference of type xsd__[TYPE]_Array which is impossible since
there is no relationship between the two classes. 

Instead, a temp variable will be used followed my a memcpy
from the temp variable to the xsd__[TYPE]_Array variable.

This is what is done on other places in the code. 

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java?rev=307253&r1=307252&r2=307253&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
Fri Oct  7 21:10:15 2005
@@ -667,21 +667,20 @@
                     {
                         containedType = CUtils.getclass4qname(qname);
                         writer.write(
-                            "\t\t\t\tRetArray = ("
-                                + outparamTypeName
-                                + "&)m_pCall->getBasicArray("
+                            "\t\t\t\tAxis_Array RetAxisArray = "
+                                + "m_pCall->getBasicArray("
                                 + CUtils.getXSDTypeForBasicType(containedType)
                                 + ", \""
                                 + returntype.getParamName()
-                                + "\", 0);\n\t\t\t}\n");
+                                + "\", 0);\n");
+		            writer.write ("\t\t\t\tmemcpy(&RetArray,&RetAxisArray,sizeof(Axis_Array));\n\t\t\t}\n");
                     }
                     else
                     {
                         containedType = qname.getLocalPart();
                         writer.write(
-                            "\t\t\t\tRetArray = ("
-                                + outparamTypeName
-                                + "&)m_pCall->getCmplxArray((void*) Axis_DeSerialize_"
+                            "\t\t\t\tAxis_Array RetAxisArray = "
+                                + "m_pCall->getCmplxArray((void*) Axis_DeSerialize_"
                                 + containedType);
                         //damitha
                         writer.write(
@@ -695,7 +694,8 @@
                                 + returntype.getParamName()
                                 + "\", Axis_URI_"
                                 + containedType
-                                + ");\n\t\t\t}\n");
+                                + ");\n");
+		            writer.write ("\t\t\t\tmemcpy(&RetArray,&RetAxisArray,sizeof(Axis_Array));\n\t\t\t}\n");
                     }
                     writer.write("\t\t}\n");
                     writer.write("\tm_pCall->unInitialize();\n");



Mime
View raw message