axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinthana Danapala (JIRA)" <>
Subject [jira] Updated: (AXISCPP-727) User SOAP Faults lost
Date Wed, 27 Jul 2005 10:47:19 GMT
     [ ]

Chinthana Danapala updated AXISCPP-727:

    Attachment: SoapSerializer.cpp

I have done some changes to the SoapSerializer and have attached it. I think this will solved
the problem.
Henrik can you check this work for you?

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