Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5 Final
-
None
-
client-Windows XP
server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
Description
The stub generated by
java -classpath %lib%\..\axis\wsdl2ws.jar;%axis% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws %wsdl% -o./ClientOut -lc++ -sclient
has a defect. In a debug win32 build, this results in the Microsoft runtime stopping the a client with a failed assertion
/*
- If this ASSERT fails, a bad pointer has been passed in. It may be
- totally bogus, or it may have been allocated from another heap.
- The pointer MUST come from the 'local' heap.
*/
_ASSERTE(_CrtIsValidHeapPointer(pUserData));
the call stack at the point of failure is
_free_dbg(void *, int)
free(void *)
operator delete(void *)
Calculator::add(int, int)
main(int, char * *)
The Calculator::add(int, int) function is declared in the generated stub Calculator.cpp. This function is shown below. The line that reads
delete Ret;
seems to be the problem.
/Methods corresponding to the web service methods/
/*
- This method wrap the service method add
*/
xsd_int Calculator::add(xsdint Value0, xsd_int Value1)
{
xsd__int* Ret = NULL;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER))
return *Ret;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false)) { m_pCall->setTransportProperty(SOAPACTION_HEADER , ""); }m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("add", "http://localhost:8080/axis/Calculator.jws");
applyUserPreferences();
m_pCall->addParameter((void*)&Value0, "i1", XSD_INT);
m_pCall->addParameter((void*)&Value1, "i2", XSD_INT);
if (AXIS_SUCCESS == m_pCall->invoke())Unknown macro: { if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http}m_pCall->unInitialize();
xsd__int r = *Ret;
delete Ret;
return r;
}
catch(AxisException& e)Unknown macro: { int iExceptionCode = e.getExceptionCode(); if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode) { throw SoapFaultException(e); } ISoapFault* pSoapFault = (ISoapFault*) m_pCall->checkFault("Fault","http}}