I've got a Python webservice using SOAPpy. The webservice server is structured as shown below:
class myClass:
def hello():
return 'world'
if __name__ == "__main__":
server = SOAPServer( ( 'localhost', 8888 ) )
myObject = myClass()
namespace = 'whatever::namespace'
server.registerObject( myObject, namespace )
server.serve_forever()
If a client calls the hello()
method from my webservice, how can I read the headers, so I can start logging some information (for example: ip address) for debugging?