Details
Description
axis-c deserializer has a problem:
IWrapperSoapDeSerializer::getChardataAs 's declaration and definition should be changed into by reference, not by value, in order to output the required value by parameter pValue.
IWrapperSoapDeSerializer has declared an interface like the below:
virtual void getChardataAs(void* pValue, XSDTYPE type)=0;
This interface is implemented in the class SoapDeSerializer like the below:
SoapDeSerializer::getChardataAs (void *pValue, XSDTYPE type)
{
... ...
pValue = pSimpleType->getValue();
... ...
}
From the code inside SoapDeSerializer::getChardataAs, you can see that the required value can not been really output by pValue for the pValue here is indeed a pointer in local stack.
If you want to output the requireed value by pValue, you should declare and define it by reference, not by value.
The suggested solution of mine is like the below:
In include/axis/IWrapperSoapDeSerializer.hpp
change the interface(getChardataAs)'s declaration into:
virtual void getChardataAs(void*& pValue, XSDTYPE type)=0;
In src/soap/SoapDeserializer.h, change the method(SoapDeSerializer::getChardataAs)'s declaration into:
void getChardataAs(void*& pValue, XSDTYPE type);
In src/soap/SoapDeserializer.cpp, change the method(SoapDeSerializer::getChardataAs)'s definition into:
SoapDeSerializer::getChardataAs (void *& pValue, XSDTYPE type)
{
...
}
Please notice that only the method's signature need to be corrected, the internal code logic can remain no change.
And correspondingly, the WSDL2WS generated code framework need to be corrected in the corresponding place. Detail please wait for another bug which I will reported for WSDL2WS later.
I've verified my solution on axis-c-1.6beta, it's OK.