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 2006/07/26 08:41:15 UTC

[jira] Closed: (AXISCPP-858) client stub delete Ret; causes Debug Assertion Failed! Win32

     [ http://issues.apache.org/jira/browse/AXISCPP-858?page=all ]

nadir amra closed AXISCPP-858.
------------------------------


> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>                 Key: AXISCPP-858
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-858
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Stub
>    Affects Versions: 1.5 Final
>         Environment: client-Windows XP
> server-Windows XP Apache Axis Java 1.2.1 deployed on Tomcat 5.5.9
>            Reporter: Brian Brooks
>             Fix For:  1.6 Beta
>
>
> 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(xsd__int 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())
> 		{
> 			if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhost:8080/axis/Calculator.jws"))
> 			{
> 				Ret = m_pCall->getElementAsInt("addReturn", 0);
> 			}
> 		}
> 	m_pCall->unInitialize();
> 		xsd__int r = *Ret;
> 		delete Ret;
> 		return r;
> 	}
> 	catch(AxisException& e)
> 	{
> 		int iExceptionCode = e.getExceptionCode();
> 		if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
> 		{
> 			throw SoapFaultException(e);
> 		}
> 		ISoapFault* pSoapFault = (ISoapFault*)
> 			m_pCall->checkFault("Fault","http://localhost:8080/axis/Calculator.jws" );
> 		if(pSoapFault)
> 		{
> 			m_pCall->unInitialize();
> 			throw SoapFaultException(e);
> 		}
> 		else throw;
> 	}
> }

-- 
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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org