You're going to need to add a little code to the dispatch module to
accomplish
this. Basically you are interested in the values returned by the bolded
statements.
-josh
def AsCGI(nsdict={}, typesmodule=None, rpc=None, modules=None):
'''Dispatch within a CGI script.
'''
if os.environ.get('REQUEST_METHOD') != 'POST':
_CGISendFault(Fault(Fault.Client, 'Must use POST'))
return
ct = os.environ['CONTENT_TYPE']
try:
if ct.startswith('multipart/'):
cid = resolvers.MIMEResolver(ct, sys.stdin)
xml = cid.GetSOAPPart()
ps = ParsedSoap(xml, resolver=cid.Resolve)
else:
length = int(os.environ['CONTENT_LENGTH'])
ps = ParsedSoap(*sys.stdin.read(length)*)
except ParseException, e:
_CGISendFault(FaultFromZSIException(e))
return
_Dispatch(ps, modules, _CGISendXML, _CGISendFault, nsdict=nsdict,
typesmodule=typesmodule, rpc=rpc)
def _Dispatch(ps, modules, SendResponse, SendFault, docstyle=0,
nsdict={}, typesmodule=None, rpc=None, **kw):
....
reply = StringIO.StringIO()
SoapWriter(reply, nsdict=nsdict).serialize(result, tc, rpc=rpc)
return SendResponse(*reply.getvalue()*, **kw)
Colin Gillespie wrote:
>Dear All,
>
>I'm dispatching WS as CGI using ZSI. How would I create a log of
>incoming and outgoing SOAP messages?
>
>I need this for debugging.
>
>Thanks
>
>Colin
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
>Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
>Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
>REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
>_______________________________________________
>Pywebsvcs-talk mailing list
>Pywebsvcs-talk@...
>https://lists.sourceforge.net/lists/listinfo/pywebsvcs-talk
>
>
|