axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Nordberg (JIRA)" <>
Subject [jira] Commented: (AXISCPP-727) User SOAP Faults lost
Date Wed, 10 Aug 2005 18:49:36 GMT
    [ ] 

Henrik Nordberg commented on AXISCPP-727:

 Yes, now the user created SOAP faults reach the client. (corrected typo)

> User SOAP Faults lost
> ---------------------
>          Key: AXISCPP-727
>          URL:
>      Project: Axis-C++
>         Type: Bug
>   Components: SOAP, Server - General
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Assignee: Chinthana Danapala
>  Attachments: SoapSerializer.cpp
> 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