You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "nadir amra (JIRA)" <ax...@ws.apache.org> on 2007/01/31 10:07:05 UTC
[jira] Resolved: (AXISCPP-967) WSDL2WS generate wrong code: no
check for param->any1 will cause core dump
[ https://issues.apache.org/jira/browse/AXISCPP-967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nadir amra resolved AXISCPP-967.
--------------------------------
Resolution: Fixed
Fix Version/s: current (nightly)
Added following check:
if (attribs[i].isOptional())
writer.write("\tif (param->any" + Integer.toString(anyCounter) + " != NULL)\n");
Will wait to close until a test case is created.
> WSDL2WS generate wrong code: no check for param->any1 will cause core dump
> --------------------------------------------------------------------------
>
> Key: AXISCPP-967
> URL: https://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
> Assigned To: nadir amra
> Fix For: current (nightly)
>
>
> [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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org