axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Whitlock (JIRA)" <>
Subject [jira] Commented: (AXISCPP-727) User SOAP Faults lost
Date Mon, 04 Jul 2005 23:10:13 GMT
    [ ] 

Mark Whitlock commented on AXISCPP-727:

Hi Henrik,
Please could you confirm that this problem is specific to the server. I checked the cvs history
of SoapSerializer::createFault and setFault and these methods have not been changed since
1.3, so something else must have changed to trigger the problem you are seeing.

> User SOAP Faults lost
> ---------------------
>          Key: AXISCPP-727
>          URL:
>      Project: Axis-C++
>         Type: Bug
>   Components: SOAP
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg

> I catch all exceptions in my wrapper code and convert them to SOAP faults, using pIWSSZ->createSoapFault().
This was working fine and the client could see the error messages that were in my exceptions.
Recently that has broken. I traced the problem down to the fact that SOAP faults are blindly
being overwritten in SoapSerializer::setSoapFault() :
>     if( m_pSoapEnvelope && (m_pSoapEnvelope->m_pSoapBody))
>     {
>         m_pSoapEnvelope->m_pSoapBody->m_pSoapFault = pSoapFault;
> When I run this in the debugger, I can see my SOAP fault in m_pSoapEnvelope->m_pSoapBody->m_pSoapFault
but as you can see, it is being over written here.
> I am not sure what changed that broke this, but I see two possible solutions:
> 1. Simply change
>     if( m_pSoapEnvelope && (m_pSoapEnvelope->m_pSoapBody))
> to
>     if( m_pSoapEnvelope && (m_pSoapEnvelope->m_pSoapBody) && !m_pSoapEnvelope->m_pSoapBody->m_pSoapFault)
> or
> 2. Append the fault string and detail nodes from one of the faults to the detail nodes
of the other.
> Also, m_pSoapEnvelope->m_pSoapBody->m_pSoapFault = pSoapFault; is a bit dangerous
in the sense that it easily leads to memory leaks (as it did here). It would be better to
use accessor methods that check if there already is a value that needs to be freed before
a new one is assigned.
> PS. While you are editing that files, it would be a good idea to change "occured" to

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message