Re: Fault Strings

Scott Hutton <[email protected]> Mon, 22 Apr 2002 11:41:41 -0700 (PDT)
Newsgroups gmane.comp.gnome.ximian.soup
Message-ID <Pine.LNX.4.44.0204221141150.22342-100000@habanero.gibraltarsoft.com>
On Apr 21, Alex Graveley 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.

So, what's the proper way to obtain the fault string/code, etc.?

 -Scott


_______________________________________________
Soup-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/soup-list