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

    Fix Version:  1.6 Beta
     Resolution: Fixed

Brian,

I'm going to mark this as resolved because this problem has been reported 
several times with Axis C++ 1.5, but we have not had any reports since the 
various fixes went into the 1.6 builds.

When you get an opportunity to test this can you then move this issue to closed 
or reopen, as appropriate.

Many Thanks,
Adrian

> client stub delete Ret; causes Debug Assertion Failed! Win32
> ------------------------------------------------------------
>
>          Key: AXISCPP-858
>          URL: http://issues.apache.org/jira/browse/AXISCPP-858
>      Project: Axis-C++
>         Type: Bug

>   Components: Client - Stub
>     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

Reply via email to