1
0
Fork 0

- add capability to specify a bind address host

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@180 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
Jan Dittberner 2006-03-08 11:19:56 +00:00
parent 0046dbe793
commit 4a8a10548a

View file

@ -20,8 +20,8 @@ class mySOAPRequestHandler(SOAPRequestHandler):
''' '''
self.send_xml(service._wsdl) self.send_xml(service._wsdl)
def AsServer(port=80, services=(), RequestHandlerClass=SOAPRequestHandler): def AsServer(iporhost='', port=80, services=(), RequestHandlerClass=SOAPRequestHandler):
address = ('', port) address = (iporhost, port)
sc = ServiceContainer(address, RequestHandlerClass=RequestHandlerClass) sc = ServiceContainer(address, RequestHandlerClass=RequestHandlerClass)
for service in services: for service in services:
path = service.getPost() path = service.getPost()
@ -29,4 +29,5 @@ def AsServer(port=80, services=(), RequestHandlerClass=SOAPRequestHandler):
sc.serve_forever() sc.serve_forever()
if __name__ == '__main__': if __name__ == '__main__':
AsServer(port=8080, services=[service], RequestHandlerClass=mySOAPRequestHandler) AsServer(iporhost='localhost', port=8080, services=[service],
RequestHandlerClass=mySOAPRequestHandler)