Details
Description
[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
}
So I think it maybe a bug, could you like to check it ?