[ http://issues.apache.org/jira/browse/AXISCPP-967?page=comments#action_12437994 ] Michael Xiong commented on AXISCPP-967: ---------------------------------------
Dear all, Environment: Tomcat 2.0.58 should be --> Tomcat 5.0.28 Could someboday help me to update the "Environment:" info ? Thanks a lot ! Michael Xiong > WSDL2WS generate wrong code: no check for param->any1 will cause core dump > -------------------------------------------------------------------------- > > Key: AXISCPP-967 > URL: http://issues.apache.org/jira/browse/AXISCPP-967 > Project: Axis-C++ > Issue Type: Bug > Components: WSDL processing - RPC > Affects 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 > > [Error Statement]: > I have used AxisCPP1.6Beta version to generate TestDataInfo.cpp and > Respond.cpp as the below: > TestDataInfo.cpp: > int Axis_Serialize_JobInfo(JobInfo* param, IWrapperSoapSerializer* pSZ, bool > bArray = false) > { > ... ... > pSZ->serializeAnyObject(param->any1); > ... ... > } > and Respond.cpp: > int Axis_Serialize_Respond(Respond* param, IWrapperSoapSerializer* pSZ, bool > bArray = false) > { > ... ... > pSZ->serializeAnyObject(param->any1); > ... ... > } > From the generated code, param->any1 is really an AnyType* pointer. > In some case, param->any1 will be NULL, but since there has no check for it > before use, there will cause my generated server component core dump. > [solution]: > I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that > if I modify the following code at about line 682~694 in > writeSerializeGlobalMethod method that belongs to BeanParamWriter > (wsdl2ws/cpp/iteral) class, the generated code will become correct. > if (attribs[i].isAnyType()) > { > anyCounter += 1; > //<mxiong debug 2006/4/25 > writer.write("\tif (param->" + attribs[i].getParamName() + > Integer.toString(anyCounter) + " != NULL)\n\t{\n"); > //>mxiong debug 2006/4/25 > writer.write("\t\tpSZ->serializeAnyObject(param->any" + > Integer.toString(anyCounter) +");\n"); > //<mxiong debug 2006/4/25 > writer.write("\t}\n"); > //>mxiong debug 2006/4/25 > } > So I think it maybe a bug, could you like to check it ? -- 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]
