axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r379738 - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
Date Wed, 22 Feb 2006 10:24:34 GMT
Author: dicka
Date: Wed Feb 22 02:24:32 2006
New Revision: 379738

URL: http://svn.apache.org/viewcvs?rev=379738&view=rev
Log:
AXISCPP-903

Resolve problem of incorrectly passing address of pointer rather than pointer to string-based
types when using serializeAsChardata(...) method.

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=379738&r1=379737&r2=379738&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
Wed Feb 22 02:24:32 2006
@@ -493,11 +493,16 @@
 
             if (extensionBaseAttrib != null)
             {
-                writer.write("\tpSZ->serializeAsChardata((void*)&(param->"
+                String typeName = extensionBaseAttrib.getTypeName();
+                writer.write("\tpSZ->serializeAsChardata((void*)");
+                if (!CUtils.isPointerType(typeName))
+                {
+                    writer.write("&");
+                }
+                writer.write("(param->"
                         + extensionBaseAttrib.getParamNameAsMember()
                         + "), "
-                        + CUtils.getXSDTypeForBasicType(extensionBaseAttrib
-                                .getTypeName()) + ");\n");
+                        + CUtils.getXSDTypeForBasicType(typeName) + ");\n");
             } 
             else
             {
@@ -609,13 +614,21 @@
         }               
         
         writer.write("\tpSZ->serialize( \">\", 0);\n");
-        if (extensionBaseAttrib != null
-                && extensionBaseAttrib.getTypeName() != null)
+        if (extensionBaseAttrib != null)
         {
-            writer.write("\tpSZ->serializeAsChardata((void*)&(param->"
-                    + extensionBaseAttrib.getParamNameAsMember()
-                    + "), "
-                    + CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName()) +
");\n");
+            String typeName = extensionBaseAttrib.getTypeName(); 
+            if( typeName != null)
+	        {
+	            writer.write("\tpSZ->serializeAsChardata((void*)");
+	            if (!CUtils.isPointerType(typeName))
+	            {
+	                writer.write("&");
+	            }
+	            writer.write("(param->"
+	                    + extensionBaseAttrib.getParamNameAsMember()
+	                    + "), "
+	                    + CUtils.getXSDTypeForBasicType(typeName) + ");\n");
+	        }
         }
 
         writer.write("\n\t/* then serialize elements if any*/\n");



Mime
View raw message