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 "Henrik Nordberg (JIRA)" <ax...@ws.apache.org> on 2005/07/01 17:54:58 UTC
[jira] Created: (AXISCPP-727) User SOAP Faults lost
User SOAP Faults lost
---------------------
Key: AXISCPP-727
URL: http://issues.apache.org/jira/browse/AXISCPP-727
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 "occurred".
--
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
[jira] Commented: (AXISCPP-727) User SOAP Faults lost
Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=comments#action_12315033 ]
Henrik Nordberg commented on AXISCPP-727:
-----------------------------------------
We use Axis-C++ only on the server, so for us this error is specific to the server. Or did I misunderstand what you wanted me to confirm?
I, too, checked the history, and agree with you. But I still think the change to SoapSerializer::setSoapFault() that I have outlined, should be made.
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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
[jira] Commented: (AXISCPP-727) User SOAP Faults lost
Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=comments#action_12318382 ]
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: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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
[jira] Resolved: (AXISCPP-727) User SOAP Faults lost
Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=all ]
Chinthana Danapala resolved AXISCPP-727:
----------------------------------------
Resolution: Fixed
Done some memory management in SOAPserializer.cpp. This will solve the problem.
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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
[jira] Updated: (AXISCPP-727) User SOAP Faults lost
Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=all ]
Mark Whitlock updated AXISCPP-727:
----------------------------------
Component: Server - General
Added server as a component.
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> Project: Axis-C++
> Type: Bug
> Components: Server - General, 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 "occurred".
--
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
[jira] Commented: (AXISCPP-727) User SOAP Faults lost
Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=comments#action_12315032 ]
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.
Thanks,
Mark
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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
[jira] Closed: (AXISCPP-727) User SOAP Faults lost
Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=all ]
Fred Preston closed AXISCPP-727:
--------------------------------
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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
[jira] Updated: (AXISCPP-727) User SOAP Faults lost
Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=all ]
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: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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
[jira] Assigned: (AXISCPP-727) User SOAP Faults lost
Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
Content-Transfer-Ency ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=all ]
Chinthana Danapala reassigned AXISCPP-727:
------------------------------------------
Assign To: Chinthana Danapala
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> Project: Axis-C++
> Type: Bug
> Components: Server - General, SOAP
> 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_pSoapEnvelopoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N
[ http://issues.apache.org/jira/browse/AXISCPP-766?page=all ]
Chinthana Danapala reassigned AXISCPP-766:
------------------------------------------
Assign To: Chinthana Danapala
> Add missing server side tests for the wsdls in test framework
> -------------------------------------------------------------
>
> Key: AXISCPP-766
> URL: http://issues.apache.org/jira/browse/AXISCPP-766
> Project: Axis-C++
> Type: Test
> Components: Test
> Reporter: Samisa Abeysinghe
> Assignee: Chinthana Danapala
> Priority: Minor
>
> Dushshantha wrote:
> Following is the list of WSDL files which we don't have services implemented in the CVS.
> Attachment1.wsdl
> AttachmentService.wsdl
> DataHandlerService.wsdl
> inquire_v2.wsdl
> MultiOut.wsdl
> NestedArrays.wsdl
> NestedComplex.wsdl
> nillableComplexType.wsdl
> PlainTextAttachment.wsdl
> UDDI.wsdl
> XSD_anyURI.wse->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 "occurred".
--
Thisdl
> XSD_base64Binary.wsdl
> XSD_boolean.wsdl
> XSD_byte.wsdl
> XSD_date.wsdl
> XSD_dateTime.wsdl
> XSD_decimal.wsdl
> XSD_double.wsdl
> XSD_duration.wsdl
> XSD_ENTITIES.wsdl
> XSD_ENTITY.wsdl
> XSD_float.wsdl
> XSD_gDay.wsdl
> XSD_gMonth.wsdl
> XSD_gMonthDay.wsdl
> XSD_gYear.wsdl
> XSD_gYearMonth.wsdl
> XSD_hexBinary.wsdl
> XSD_ID.wsdl
> XSD_IDREF.wsdl
> XSD_IDREFS.wsdl
> XSD_int.wsdl
> XSD_integer.wsdl
> XSD_language.wsdl
> XSD_long.wsdl
> XSD_Name.wsdl
> XSD_NCName.wsdl
> XSD_negativeInteger.wsdl
> XSD_NMTOKEN.wsdl
> XSD_NMTOKENS.wsdl
> XSD_nonNegativeInteger.wsdl
> XSD_nonPositiveInteger.wsdl
> XSD_normalizedString.wsdl
> XSD_NOTATION.wsdl
> XSD_positiveInteger.wsdl
> XSD_QName.wsdl
> XSD_short.wsdl
> XSD_string.wsdl
> XSD_time.wsdl
> XSD_token.wsdl
> XSD_unsignedByte.wsdl
> XSD_unsignedInt.wsdl
> XSD_unsignedLong.wsdl
> XSD_unsignedShort.wsdl
> Samisa:We have too add these server side tests.
> This is somewhat time consuming task.
--
This message is automatically generated by JIRA.
-
If you think it wa 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
s 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
[jira] Commented: (AXISCPP-727) User SOAP Faults lost
Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-727?page=comments#action_12318381 ]
Henrik Nordberg commented on AXISCPP-727:
-----------------------------------------
Yes, not the user created SOAP faults reach the client.
> User SOAP Faults lost
> ---------------------
>
> Key: AXISCPP-727
> URL: http://issues.apache.org/jira/browse/AXISCPP-727
> 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 "occurred".
--
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