[Fedora-suds-list] Handling faults from Axis web service
Joshua J. Kugler
joshua at eeinternet.com
Tue Mar 30 16:07:26 UTC 2010
On Tuesday 30 March 2010, Martin Aspeli elucidated thus:
> AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
> faultSubcode:
> faultString: 213
> faultActor:
> faultNode:
> faultDetail:
> {http://acme.com/}SOAPException:<message>213</message>
>
> The bit we're interested in is the 213. So, we have code like this:
>
> try:
> response = client.service.someMethod()
> except WebFault, e:
> # ?
>
> The question is how we get at that 213 in the 'e' that's returned. My
> guess was e.fault.message, but that's mostly conjecture.
If the above is truly the data structure of the fault, then you should
be able to get it via e.faultString.
j
--
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A
More information about the suds
mailing list