[Twisted-Python] Raise soap faults

Charles Moad cmoad at indiana.edu
Fri Apr 15 12:39:03 EDT 2005

	I have a soap server that I am trying to make handle errors correctly.
 When there is an error I just return a SOAPpy.faultType instance.  The
client should correspondlingly raise a python exception when it gets
this.  Unfortunately it looks like twisted is returning the faultType
instance as a valid response.  Here is the returned SOAP:

*** Incoming SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<pdbChainFileCompressedResponse SOAP-ENC:root="1">
<SOAP-ENV:Fault SOAP-ENC:root="1">
<faultstring>Invalid PDB Code</faultstring>

and the python result literally is:

<SOAPpy.Types.structType Fault at -1213565780>: {'faultcode':
'ArgumentError', 'faultstring': 'Invalid PDB Code'}

So the soappy client is treating this as a valid return value, and not
raising an exception like it should.

Any ideas?


More information about the Twisted-Python mailing list