Re: Fault Strings
Brad Douglas <[email protected]> Mon, 22 Apr 2002 16:56:36 -0700 (PDT)
| Newsgroups | gmane.comp.gnome.ximian.soup |
|---|---|
| Message-ID | <[email protected]> |
On 22 Apr 2002, Alex Graveley wrote:
>On Mon, 2002-04-22 at 14:41, Scott Hutton wrote:
>> On Apr 21, Alex Graveley wrote:
>> | SOUP_MESSAGE_IS_ERROR only tells you if the HTTP response was
>> | unsuccessful, not whether a successful response contains a SOAP fault.
>>
>> So, what's the proper way to obtain the fault string/code, etc.?
>>
>> -Scott
>
>if (SOUP_MESSAGE_IS_ERROR(msg)) {
> g_print ("SOUP Error: %d \"%s\"\n",
> msg->errorcode,
> msg->errorphase);
> exit (1);
>}
>
>parser = soup_parser_new_from_buffer (&msg->response);
>
>fault = soup_parser_get_fault (parser);
>if (fault) {
> g_print ("SOAP Fault: %s\n", soup_fault_get_string (fault));
> exit (1);
>}
>
>... process successful message ...
This is essentially the code I originally posted!
We do know that:
1) A fault is being sent back from the server
2) This is processed correctly by MSSOAP as a
fault.
3) soup_parser_get_fault() returns NULL.
I don't think soup is checking to see if a response is
a fault, not an error, but I could be wrong. I
also think that SOUP_MESSAGE_IS_ERROR() should be
implied due to the fault's 500 status. Either that or
a SOUP_MESSAGE_IS_FAULT() macro should be added.
Your help/comments are greatly appreciated.
Brad Douglas
_______________________________________________
Soup-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/soup-list