WSDL2WS generate wrong code: for AXISCPP-972, getChardataAs((void*)&... should 
be getChardataAs((void* &)...
------------------------------------------------------------------------------------------------------------

         Key: AXISCPP-973
         URL: http://issues.apache.org/jira/browse/AXISCPP-973
     Project: Axis-C++
        Type: Bug

  Components: WSDL processing - RPC  
    Versions:  1.6 Beta    
 Environment:     Platform:
        Linux fedora 3.0
Axis version:
        Server-side Axis C++ 1.6Beta
XML Parser Lib:
xersesc 2.6
WSDL2ws tool by using axis java 1.3
Client-side version Axis java 1.3
Http Server Version:
Apache 2.0.53
Tomcat 2.0.58
    Reporter: Michael Xiong


The code in 
src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
has a bug for generating code for pIWSDZ->getChardataAs operation.

As my reported bug of AXISCPP-972 for axis-c engine/deserialization, 
getChardataAs's signature should be changed from by value to by reference.
So the corresponding of WSDL2WS should also changed to generate the correct 
code framework.

My solution is as the below:
The private function "void writeDeSerializeGlobalMethod()" in 
BeanParamWriter.java should be modified as the below:
 private void writeDeSerializeGlobalMethod() throws IOException, WrapperFault
 {
... ...
        if (attribs.length == 0)
        {
            if (extensionBaseAttrib != null)
            {
//<mxiong debug 2006/6/5                
//               writer.write("\tpIWSDZ->getChardataAs((void*)&(param->"
                 writer.write("\tpIWSDZ->getChardataAs((void* &)(param->"
                        + extensionBaseAttrib.getParamNameAsMember()
                        + "), "
                        + 
CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName()) + ");\n");
//>mxiong debug 2006/6/5                
            }
... ...
       }
... ...
        if (extensionBaseAttrib != null
                && extensionBaseAttrib.getTypeName() != null)
        {
//<mxiong debug 2006/6/5
//            writer.write("\tpIWSDZ->getChardataAs((void*)&(param->"
              writer.write("\tpIWSDZ->getChardataAs((void* &)(param->"
                    + extensionBaseAttrib.getParamNameAsMember()
                    + "), "
                    + 
CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName()) + ");\n");
//>mxiong debug 2006/6/5
        }

        writer.write("\treturn pIWSDZ->getStatus();\n");
        writer.write("}\n");
    }
}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to