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 <thomass...@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 <jayaw...@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 <thomass...@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-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org

Reply via email to