Update of /cvsroot/gug/gug/gug/host/handler
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31333
Modified Files:
soap.py
Log Message:
SOAP debug: request/arguments/response
Index: soap.py
===================================================================
RCS file: /cvsroot/gug/gug/gug/host/handler/soap.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** soap.py 6 Jun 2007 14:21:12 -0000 1.18
--- soap.py 26 Jun 2007 14:07:48 -0000 1.19
***************
*** 63,70 ****
"""
try:
# parse the SOAP message using ZSI's ParsedSoap class
ps = ParsedSoap(data, readerclass = ExpatReaderClass)
# the root node of the SOAP message is the method_name
! method_name = ps.body_root.nodeName
if hasattr(self.servo, method_name):
# if the served_object has a method called 'method_name'
--- 63,73 ----
"""
try:
+ if 'http://gug.grid.niif.hu/schemas/2007/06' in data:
+ log.msg('SOAP request:', data)
+
# parse the SOAP message using ZSI's ParsedSoap class
ps = ParsedSoap(data, readerclass = ExpatReaderClass)
# the root node of the SOAP message is the method_name
! method_name = ps.body_root.nodeName.split(':')[-1]
if hasattr(self.servo, method_name):
# if the served_object has a method called 'method_name'
***************
*** 80,83 ****
--- 83,90 ----
#args = tuple(ps.Parse(TC.Array('args',MyAny(nillable = True), undeclared = True)))
arguments = ps.Parse(MyAny(nillable = True))
+
+ if 'http://gug.grid.niif.hu/schemas/2007/06' in data:
+ log.msg('arguments:', arguments)
+
if isinstance(arguments,dict):
kw = arguments
***************
*** 90,96 ****
# create a SOAP message
response = str(SoapWriter().serialize({'Response': result}, MyAny(nillable = True)))
except Exception, e:
# if there is any exception, first write it to the log
! # log.error() # or maybe not
# get the string representation of the Exception class
# use cgi.escape not to interfere with the xml syntax of the SOAP message
--- 97,107 ----
# create a SOAP message
response = str(SoapWriter().serialize({'Response': result}, MyAny(nillable = True)))
+
+ if 'http://gug.grid.niif.hu/schemas/2007/06' in data:
+ log.msg('SOAP response:', response)
+
except Exception, e:
# if there is any exception, first write it to the log
! log.error() # or maybe not
# get the string representation of the Exception class
# use cgi.escape not to interfere with the xml syntax of the SOAP message
|