Re: Fault Strings
Alex Graveley <[email protected]> 21 Apr 2002 07:25:55 -0400
| Newsgroups | gmane.comp.gnome.ximian.soup |
|---|---|
| Message-ID | <1019388355.10770.63.camel@luna> |
Hi,
On Sun, 2002-04-21 at 04:28, Brad Douglas wrote:
>
> I'm trying to extract the fault string from a server
> response (on error). The following code *should* work,
> shouldn't it? I keep getting back NULL for 'fault'.
> What am I doing wrong?
>
>
> if (SOUP_MESSAGE_IS_ERROR(msg)) {
> SoupFault *fault;
> const guchar *string;
>
> fault = soup_parser_get_fault(parser);
> string = soup_fault_get_string(fault);
>
> g_warning("SOUP Error: %d \"%s\": %s\n",
> msg->errorcode,
> msg->errorphrase,
> string);
>
> soup_parser_free(parser);
>
> return FALSE;
> }
SOUP_MESSAGE_IS_ERROR only tells you if the HTTP response was
unsuccessful, not whether a successful response contains a SOAP fault.
-Alex
--
"Make it go faster! Maybe if I click it, it will go faster..."
_______________________________________________
Soup-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/soup-list