ZSI and faults

CSG csgcsg39 at hotmail.com
Fri Jan 9 17:07:08 CET 2004


Dear All,

I'm very new to python/ZSI and have a (simple) query to ask. I have a
simple client:

from ZSI.client import Binding
fp=open('debug.out','w')
b=Binding(url='somewhere',tracefile=fp)
print b.connect('usename')
fp.close()

and a server of

from ZSI import *
import sys

def connect(usename):
  try:
    <something that fails>
  except Exception,e:
    <write the Exception in the SOAP message back to client>
    sys.exit(1)


The trouble I'm having is with the <write the Exception in the SOAP
message bit>. I've tried things like:

FaultFromException(e,0).AsSOAP(sys.stdout)
or
f=Fault()
f.code="some message"

with no success.

Any suggestions

Many thanks

Colin



More information about the Python-list mailing list