You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Thomas S <th...@gmail.com> on 2010/09/01 20:20:36 UTC

Axis2C Soap Exception Handling

I am currently working on porting a C++ soap client from the rather aged MS
Soap Toolkit to Axis2C.
To start with this will run on Windows but part of the exercise is to get
our system ported to Linux.
For the most part the port was fairly straight-forward and I am getting good
results with my unit tests.

However, there is one situation I haven't quite figured out yet - handling
of Soap Faults.

My unit test "SoapExceptionsService" returns the following (taken from
SoapUI output).

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode xmlns:q0="http://www.cc.com/SoapExceptionService
">q0:SoapExceptionService</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: This is
the FaultString
   at SoapExceptionService.Service1.HelloWorld(RequestInput
ri)</faultstring>
         <faultactor>http://www.cc.com/SoapExceptionService</faultactor>
         <detail>
            <DetailMessage>This is the Detail section</DetailMessage>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

Using the MS Soap Toolkit there are methods returning all the separate
pieces of the exception:

FaultActor         = "http://www.cc.com/SoapExceptionService"
FaultCode         = "SoapExceptionService"
FaultCodeNamespace     = "http://www.cc.com/SoapExceptionService"
FaultDetail         = "<detail><DetailMessage>This is the Detail
section</DetailMessage></detail>"
FaultString         = "System.Web.Services.Protocols.SoapException: This is
the FaultString
                   at SoapExceptionService.Service1.HelloWorld(RequestInput
ri)"

However, using Axis2C (I tried both 1.6 and latest 1.7 code from SVN) only
returns a subset of these fields.

Fault Code: (null)
Exception: (null)
Reason: (null)
Role: http://www.cc.com/SoapExceptionService
Detail xml: <detail><DetailMessage>This is the Detail
section</DetailMessage></detail>

If I retrieve the fault base node and serialize it I see the whole fault
message so Axis has all the data available.
I stepped through function axiom_soap_body_convert_fault_to_soap11() and it
appears that the values are found and text elements are created for the
missing items but when I try to retrieve them using the axis functions the
string values end up being NULL.

Example:

                axis2_char_t *strcodevalue = "";
                ::axiom_soap_fault_code *fcode =
::axiom_soap_fault_get_code(fault, env);  // returns ok value
                if (fcode) {
                    ::axiom_soap_fault_value *fcodevalue =
::axiom_soap_fault_code_get_value(fcode, env);  // returns ok value
                    if (fcodevalue) {
                        strcodevalue =
::axiom_soap_fault_value_get_text(fcodevalue, env);  // return NULL
                    }
                }

I suppose I could manually parse the fault xml but I'd kinda prefer to let
the Soap library handle these details.

Am I missing something here or just plain oversimplifying things? Any
pointers would be appreciated.

Many thanks in advance,
Thomas

Re: Axis2C Soap Exception Handling

Posted by Thomas S <th...@gmail.com>.
A good while ago I realized that the (then) current label of Axis2C had a
problem returning all fields of a soap exception thrown by the remote
server. I looked into it for a while and entered JIRA
AXIS2C-1507<https://issues.apache.org/jira/browse/AXIS2C-1507>for
this.

As I noticed that over the last few months there had been numerous patches
and fixes applied to the trunk of Axis2C I tried latest Trunk code against
an asp.net soap service returning soap faults. Unfortunately, the issue
with not populating all fault members apparently has not been fixed yet as
current code behaves exactly the same way in regards to this functionality.

Has anyone come up with a workaround for this issue or am I the only one
having problems with this and having a need for soap fault support?

Thanks in advance,
Thomas

On Wed, Sep 1, 2010 at 2:20 PM, Thomas S <th...@gmail.com> wrote:

> I am currently working on porting a C++ soap client from the rather aged
> MS Soap Toolkit to Axis2C.
> To start with this will run on Windows but part of the exercise is to get
> our system ported to Linux.
> For the most part the port was fairly straight-forward and I am getting
> good results with my unit tests.
>
> However, there is one situation I haven't quite figured out yet - handling
> of Soap Faults.
>
> My unit test "SoapExceptionsService" returns the following (taken from
> SoapUI output).
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>    <soap:Body>
>       <soap:Fault>
>          <faultcode xmlns:q0="http://www.cc.com/SoapExceptionService
> ">q0:SoapExceptionService</faultcode>
>          <faultstring>System.Web.Services.Protocols.SoapException: This is
> the FaultString
>    at SoapExceptionService.Service1.HelloWorld(RequestInput
> ri)</faultstring>
>          <faultactor>http://www.cc.com/SoapExceptionService</faultactor>
>          <detail>
>             <DetailMessage>This is the Detail section</DetailMessage>
>          </detail>
>       </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
>
> Using the MS Soap Toolkit there are methods returning all the separate
> pieces of the exception:
>
> FaultActor         = "http://www.cc.com/SoapExceptionService"
> FaultCode         = "SoapExceptionService"
> FaultCodeNamespace     = "http://www.cc.com/SoapExceptionService"
> FaultDetail         = "<detail><DetailMessage>This is the Detail
> section</DetailMessage></detail>"
> FaultString         = "System.Web.Services.Protocols.SoapException: This
> is the FaultString
>                    at
> SoapExceptionService.Service1.HelloWorld(RequestInput ri)"
>
> However, using Axis2C (I tried both 1.6 and latest 1.7 code from SVN) only
> returns a subset of these fields.
>
> Fault Code: (null)
> Exception: (null)
> Reason: (null)
> Role: http://www.cc.com/SoapExceptionService
> Detail xml: <detail><DetailMessage>This is the Detail
> section</DetailMessage></detail>
>
> If I retrieve the fault base node and serialize it I see the whole fault
> message so Axis has all the data available.
> I stepped through function axiom_soap_body_convert_fault_to_soap11() and
> it appears that the values are found and text elements are created for the
> missing items but when I try to retrieve them using the axis functions the
> string values end up being NULL.
>
> Example:
>
>                 axis2_char_t *strcodevalue = "";
>                 ::axiom_soap_fault_code *fcode =
> ::axiom_soap_fault_get_code(fault, env);  // returns ok value
>                 if (fcode) {
>                     ::axiom_soap_fault_value *fcodevalue =
> ::axiom_soap_fault_code_get_value(fcode, env);  // returns ok value
>                     if (fcodevalue) {
>                         strcodevalue =
> ::axiom_soap_fault_value_get_text(fcodevalue, env);  // return NULL
>                     }
>                 }
>
> I suppose I could manually parse the fault xml but I'd kinda prefer to let
> the Soap library handle these details.
>
> Am I missing something here or just plain oversimplifying things? Any
> pointers would be appreciated.
>
> Many thanks in advance,
> Thomas
>

AW: Axis2C Soap Exception Handling

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
When I look, as you can as well, at the JITA AXIS2C-1507 then I can
see that no developer has been assigned to fix this reported bug 
since you filed the JIRA in Nov 2010.

This is in fact not the aim of the JIRA system, and an assignment
would be the least you can expect since Nov 2010. This my thoughts.

The other thing you can do is: to provide your fix to developers.
They are short on developer-power and are very thankful for help.
They can sniff it in and you can then test the trunk one more time.

Josef

-----Ursprüngliche Nachricht-----
Von: Thomas S [mailto:thomass462@gmail.com] 
Gesendet: Mittwoch, 4. April 2012 23:18
An: Apache AXIS C User List
Betreff: Re: Axis2C Soap Exception Handling

Hello everyone.

A good while ago I realized that the (then) current label of Axis2C
had a problem returning all fields of a soap exception thrown by the
remote server. I looked into it for a while and entered JIRA
AXIS2C-1507 for this.

As I noticed that over the last few months there had been numerous
patches and fixes applied to the trunk of Axis2C I tried latest Trunk
code against an asp.net soap service returning soap faults.
Unfortunately, the issue with not populating all fault members
apparently has not been fixed yet as current code behaves exactly the
same way in regards to this functionality.

Has anyone come up with a workaround for this issue or am I the only
one having problems with this and having a need for soap fault
support?

Thanks in advance,
Thomas

On Tue, Nov 30, 2010 at 10:27 AM, Thomas S <th...@gmail.com> wrote:
> Thank you Nandika.
>
> I just recently got back to working on this. The issue still exists in
> latest code and I created JIRA entry AXIS2C-1507 for it.
>
> --Thomas
>
>
> On Fri, Sep 3, 2010 at 1:08 AM, Nandika Jayawardana <ja...@gmail.com>
> wrote:
>>
>> Hi Thomas,
>> It seems there is an issue. Can you raise a jira issue for this.
>>
>> Regards
>> Nandika
>>
>>
>> On Wed, Sep 1, 2010 at 11:50 PM, Thomas S <th...@gmail.com> wrote:
>>>
>>> I am currently working on porting a C++ soap client from the rather aged
>>> MS Soap Toolkit to Axis2C.
>>> To start with this will run on Windows but part of the exercise is to get
>>> our system ported to Linux.
>>> For the most part the port was fairly straight-forward and I am getting
>>> good results with my unit tests.
>>>
>>> However, there is one situation I haven't quite figured out yet -
>>> handling of Soap Faults.
>>>
>>> My unit test "SoapExceptionsService" returns the following (taken from
>>> SoapUI output).
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>    <soap:Body>
>>>       <soap:Fault>
>>>          <faultcode
>>> xmlns:q0="http://www.cc.com/SoapExceptionService">q0:SoapExceptionService</faultcode>
>>>          <faultstring>System.Web.Services.Protocols.SoapException: This
>>> is the FaultString
>>>    at SoapExceptionService.Service1.HelloWorld(RequestInput
>>> ri)</faultstring>
>>>          <faultactor>http://www.cc.com/SoapExceptionService</faultactor>
>>>          <detail>
>>>             <DetailMessage>This is the Detail section</DetailMessage>
>>>          </detail>
>>>       </soap:Fault>
>>>    </soap:Body>
>>> </soap:Envelope>
>>>
>>> Using the MS Soap Toolkit there are methods returning all the separate
>>> pieces of the exception:
>>>
>>> FaultActor         = "http://www.cc.com/SoapExceptionService"
>>> FaultCode         = "SoapExceptionService"
>>> FaultCodeNamespace     = "http://www.cc.com/SoapExceptionService"
>>> FaultDetail         = "<detail><DetailMessage>This is the Detail
>>> section</DetailMessage></detail>"
>>> FaultString         = "System.Web.Services.Protocols.SoapException: This
>>> is the FaultString
>>>                    at
>>> SoapExceptionService.Service1.HelloWorld(RequestInput ri)"
>>>
>>> However, using Axis2C (I tried both 1.6 and latest 1.7 code from SVN)
>>> only returns a subset of these fields.
>>>
>>> Fault Code: (null)
>>> Exception: (null)
>>> Reason: (null)
>>> Role: http://www.cc.com/SoapExceptionService
>>> Detail xml: <detail><DetailMessage>This is the Detail
>>> section</DetailMessage></detail>
>>>
>>> If I retrieve the fault base node and serialize it I see the whole fault
>>> message so Axis has all the data available.
>>> I stepped through function axiom_soap_body_convert_fault_to_soap11() and
>>> it appears that the values are found and text elements are created for the
>>> missing items but when I try to retrieve them using the axis functions the
>>> string values end up being NULL.
>>>
>>> Example:
>>>
>>>                 axis2_char_t *strcodevalue = "";
>>>                 ::axiom_soap_fault_code *fcode =
>>> ::axiom_soap_fault_get_code(fault, env);  // returns ok value
>>>                 if (fcode) {
>>>                     ::axiom_soap_fault_value *fcodevalue =
>>> ::axiom_soap_fault_code_get_value(fcode, env);  // returns ok value
>>>                     if (fcodevalue) {
>>>                         strcodevalue =
>>> ::axiom_soap_fault_value_get_text(fcodevalue, env);  // return NULL
>>>                     }
>>>                 }
>>>
>>> I suppose I could manually parse the fault xml but I'd kinda prefer to
>>> let the Soap library handle these details.
>>>
>>> Am I missing something here or just plain oversimplifying things? Any
>>> pointers would be appreciated.
>>>
>>> Many thanks in advance,
>>> Thomas
>>
>>
>>
>>
>> --
>> http://nandikajayawardana.blogspot.com/
>> WSO2 Inc: http://www.wso2.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Re: Axis2C Soap Exception Handling

Posted by Thomas S <th...@gmail.com>.
Hello everyone.

A good while ago I realized that the (then) current label of Axis2C
had a problem returning all fields of a soap exception thrown by the
remote server. I looked into it for a while and entered JIRA
AXIS2C-1507 for this.

As I noticed that over the last few months there had been numerous
patches and fixes applied to the trunk of Axis2C I tried latest Trunk
code against an asp.net soap service returning soap faults.
Unfortunately, the issue with not populating all fault members
apparently has not been fixed yet as current code behaves exactly the
same way in regards to this functionality.

Has anyone come up with a workaround for this issue or am I the only
one having problems with this and having a need for soap fault
support?

Thanks in advance,
Thomas

On Tue, Nov 30, 2010 at 10:27 AM, Thomas S <th...@gmail.com> wrote:
> Thank you Nandika.
>
> I just recently got back to working on this. The issue still exists in
> latest code and I created JIRA entry AXIS2C-1507 for it.
>
> --Thomas
>
>
> On Fri, Sep 3, 2010 at 1:08 AM, Nandika Jayawardana <ja...@gmail.com>
> wrote:
>>
>> Hi Thomas,
>> It seems there is an issue. Can you raise a jira issue for this.
>>
>> Regards
>> Nandika
>>
>>
>> On Wed, Sep 1, 2010 at 11:50 PM, Thomas S <th...@gmail.com> wrote:
>>>
>>> I am currently working on porting a C++ soap client from the rather aged
>>> MS Soap Toolkit to Axis2C.
>>> To start with this will run on Windows but part of the exercise is to get
>>> our system ported to Linux.
>>> For the most part the port was fairly straight-forward and I am getting
>>> good results with my unit tests.
>>>
>>> However, there is one situation I haven't quite figured out yet -
>>> handling of Soap Faults.
>>>
>>> My unit test "SoapExceptionsService" returns the following (taken from
>>> SoapUI output).
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>    <soap:Body>
>>>       <soap:Fault>
>>>          <faultcode
>>> xmlns:q0="http://www.cc.com/SoapExceptionService">q0:SoapExceptionService</faultcode>
>>>          <faultstring>System.Web.Services.Protocols.SoapException: This
>>> is the FaultString
>>>    at SoapExceptionService.Service1.HelloWorld(RequestInput
>>> ri)</faultstring>
>>>          <faultactor>http://www.cc.com/SoapExceptionService</faultactor>
>>>          <detail>
>>>             <DetailMessage>This is the Detail section</DetailMessage>
>>>          </detail>
>>>       </soap:Fault>
>>>    </soap:Body>
>>> </soap:Envelope>
>>>
>>> Using the MS Soap Toolkit there are methods returning all the separate
>>> pieces of the exception:
>>>
>>> FaultActor         = "http://www.cc.com/SoapExceptionService"
>>> FaultCode         = "SoapExceptionService"
>>> FaultCodeNamespace     = "http://www.cc.com/SoapExceptionService"
>>> FaultDetail         = "<detail><DetailMessage>This is the Detail
>>> section</DetailMessage></detail>"
>>> FaultString         = "System.Web.Services.Protocols.SoapException: This
>>> is the FaultString
>>>                    at
>>> SoapExceptionService.Service1.HelloWorld(RequestInput ri)"
>>>
>>> However, using Axis2C (I tried both 1.6 and latest 1.7 code from SVN)
>>> only returns a subset of these fields.
>>>
>>> Fault Code: (null)
>>> Exception: (null)
>>> Reason: (null)
>>> Role: http://www.cc.com/SoapExceptionService
>>> Detail xml: <detail><DetailMessage>This is the Detail
>>> section</DetailMessage></detail>
>>>
>>> If I retrieve the fault base node and serialize it I see the whole fault
>>> message so Axis has all the data available.
>>> I stepped through function axiom_soap_body_convert_fault_to_soap11() and
>>> it appears that the values are found and text elements are created for the
>>> missing items but when I try to retrieve them using the axis functions the
>>> string values end up being NULL.
>>>
>>> Example:
>>>
>>>                 axis2_char_t *strcodevalue = "";
>>>                 ::axiom_soap_fault_code *fcode =
>>> ::axiom_soap_fault_get_code(fault, env);  // returns ok value
>>>                 if (fcode) {
>>>                     ::axiom_soap_fault_value *fcodevalue =
>>> ::axiom_soap_fault_code_get_value(fcode, env);  // returns ok value
>>>                     if (fcodevalue) {
>>>                         strcodevalue =
>>> ::axiom_soap_fault_value_get_text(fcodevalue, env);  // return NULL
>>>                     }
>>>                 }
>>>
>>> I suppose I could manually parse the fault xml but I'd kinda prefer to
>>> let the Soap library handle these details.
>>>
>>> Am I missing something here or just plain oversimplifying things? Any
>>> pointers would be appreciated.
>>>
>>> Many thanks in advance,
>>> Thomas
>>
>>
>>
>>
>> --
>> http://nandikajayawardana.blogspot.com/
>> WSO2 Inc: http://www.wso2.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Re: Axis2C Soap Exception Handling

Posted by Thomas S <th...@gmail.com>.
Thank you Nandika.

I just recently got back to working on this. The issue still exists in
latest code and I created JIRA entry
AXIS2C-1507<https://issues.apache.org/jira/browse/AXIS2C-1507>for it.

--Thomas

On Fri, Sep 3, 2010 at 1:08 AM, Nandika Jayawardana <ja...@gmail.com>wrote:

> Hi Thomas,
> It seems there is an issue. Can you raise a jira issue for this.
>
> Regards
> Nandika
>
>
> On Wed, Sep 1, 2010 at 11:50 PM, Thomas S <th...@gmail.com> wrote:
>
>> I am currently working on porting a C++ soap client from the rather aged
>> MS Soap Toolkit to Axis2C.
>> To start with this will run on Windows but part of the exercise is to get
>> our system ported to Linux.
>> For the most part the port was fairly straight-forward and I am getting
>> good results with my unit tests.
>>
>> However, there is one situation I haven't quite figured out yet - handling
>> of Soap Faults.
>>
>> My unit test "SoapExceptionsService" returns the following (taken from
>> SoapUI output).
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
>> http://www.w3.org/2001/XMLSchema">
>>    <soap:Body>
>>       <soap:Fault>
>>          <faultcode xmlns:q0="http://www.cc.com/SoapExceptionService
>> ">q0:SoapExceptionService</faultcode>
>>          <faultstring>System.Web.Services.Protocols.SoapException: This is
>> the FaultString
>>    at SoapExceptionService.Service1.HelloWorld(RequestInput
>> ri)</faultstring>
>>          <faultactor>http://www.cc.com/SoapExceptionService</faultactor>
>>          <detail>
>>             <DetailMessage>This is the Detail section</DetailMessage>
>>          </detail>
>>       </soap:Fault>
>>    </soap:Body>
>> </soap:Envelope>
>>
>> Using the MS Soap Toolkit there are methods returning all the separate
>> pieces of the exception:
>>
>> FaultActor         = "http://www.cc.com/SoapExceptionService"
>> FaultCode         = "SoapExceptionService"
>> FaultCodeNamespace     = "http://www.cc.com/SoapExceptionService"
>> FaultDetail         = "<detail><DetailMessage>This is the Detail
>> section</DetailMessage></detail>"
>> FaultString         = "System.Web.Services.Protocols.SoapException: This
>> is the FaultString
>>                    at
>> SoapExceptionService.Service1.HelloWorld(RequestInput ri)"
>>
>> However, using Axis2C (I tried both 1.6 and latest 1.7 code from SVN) only
>> returns a subset of these fields.
>>
>> Fault Code: (null)
>> Exception: (null)
>> Reason: (null)
>> Role: http://www.cc.com/SoapExceptionService
>> Detail xml: <detail><DetailMessage>This is the Detail
>> section</DetailMessage></detail>
>>
>> If I retrieve the fault base node and serialize it I see the whole fault
>> message so Axis has all the data available.
>> I stepped through function axiom_soap_body_convert_fault_to_soap11() and
>> it appears that the values are found and text elements are created for the
>> missing items but when I try to retrieve them using the axis functions the
>> string values end up being NULL.
>>
>> Example:
>>
>>                 axis2_char_t *strcodevalue = "";
>>                 ::axiom_soap_fault_code *fcode =
>> ::axiom_soap_fault_get_code(fault, env);  // returns ok value
>>                 if (fcode) {
>>                     ::axiom_soap_fault_value *fcodevalue =
>> ::axiom_soap_fault_code_get_value(fcode, env);  // returns ok value
>>                     if (fcodevalue) {
>>                         strcodevalue =
>> ::axiom_soap_fault_value_get_text(fcodevalue, env);  // return NULL
>>                     }
>>                 }
>>
>> I suppose I could manually parse the fault xml but I'd kinda prefer to let
>> the Soap library handle these details.
>>
>> Am I missing something here or just plain oversimplifying things? Any
>> pointers would be appreciated.
>>
>> Many thanks in advance,
>> Thomas
>>
>
>
>
> --
> http://nandikajayawardana.blogspot.com/
> WSO2 Inc: http://www.wso2.com
>

Re: Axis2C Soap Exception Handling

Posted by Nandika Jayawardana <ja...@gmail.com>.
Hi Thomas,
It seems there is an issue. Can you raise a jira issue for this.

Regards
Nandika


On Wed, Sep 1, 2010 at 11:50 PM, Thomas S <th...@gmail.com> wrote:

> I am currently working on porting a C++ soap client from the rather aged MS
> Soap Toolkit to Axis2C.
> To start with this will run on Windows but part of the exercise is to get
> our system ported to Linux.
> For the most part the port was fairly straight-forward and I am getting
> good results with my unit tests.
>
> However, there is one situation I haven't quite figured out yet - handling
> of Soap Faults.
>
> My unit test "SoapExceptionsService" returns the following (taken from
> SoapUI output).
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>    <soap:Body>
>       <soap:Fault>
>          <faultcode xmlns:q0="http://www.cc.com/SoapExceptionService
> ">q0:SoapExceptionService</faultcode>
>          <faultstring>System.Web.Services.Protocols.SoapException: This is
> the FaultString
>    at SoapExceptionService.Service1.HelloWorld(RequestInput
> ri)</faultstring>
>          <faultactor>http://www.cc.com/SoapExceptionService</faultactor>
>          <detail>
>             <DetailMessage>This is the Detail section</DetailMessage>
>          </detail>
>       </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
>
> Using the MS Soap Toolkit there are methods returning all the separate
> pieces of the exception:
>
> FaultActor         = "http://www.cc.com/SoapExceptionService"
> FaultCode         = "SoapExceptionService"
> FaultCodeNamespace     = "http://www.cc.com/SoapExceptionService"
> FaultDetail         = "<detail><DetailMessage>This is the Detail
> section</DetailMessage></detail>"
> FaultString         = "System.Web.Services.Protocols.SoapException: This is
> the FaultString
>                    at SoapExceptionService.Service1.HelloWorld(RequestInput
> ri)"
>
> However, using Axis2C (I tried both 1.6 and latest 1.7 code from SVN) only
> returns a subset of these fields.
>
> Fault Code: (null)
> Exception: (null)
> Reason: (null)
> Role: http://www.cc.com/SoapExceptionService
> Detail xml: <detail><DetailMessage>This is the Detail
> section</DetailMessage></detail>
>
> If I retrieve the fault base node and serialize it I see the whole fault
> message so Axis has all the data available.
> I stepped through function axiom_soap_body_convert_fault_to_soap11() and it
> appears that the values are found and text elements are created for the
> missing items but when I try to retrieve them using the axis functions the
> string values end up being NULL.
>
> Example:
>
>                 axis2_char_t *strcodevalue = "";
>                 ::axiom_soap_fault_code *fcode =
> ::axiom_soap_fault_get_code(fault, env);  // returns ok value
>                 if (fcode) {
>                     ::axiom_soap_fault_value *fcodevalue =
> ::axiom_soap_fault_code_get_value(fcode, env);  // returns ok value
>                     if (fcodevalue) {
>                         strcodevalue =
> ::axiom_soap_fault_value_get_text(fcodevalue, env);  // return NULL
>                     }
>                 }
>
> I suppose I could manually parse the fault xml but I'd kinda prefer to let
> the Soap library handle these details.
>
> Am I missing something here or just plain oversimplifying things? Any
> pointers would be appreciated.
>
> Many thanks in advance,
> Thomas
>



-- 
http://nandikajayawardana.blogspot.com/
WSO2 Inc: http://www.wso2.com