source: vanHelsing/trunk/src/VanHelsingServer.py@ 825

Last change on this file since 825 was 824, checked in by slederer, on Feb 17, 2010 at 5:49:19 PM

Generierter Server-Code

File size: 661 bytes
Line 
1from ZSI.ServiceContainer import ServiceContainer, SOAPRequestHandler
2
3from VanHelsing_server import VanHelsing
4
5class VanSOAPRequestHandler(SOAPRequestHandler):
6 def do_GET(self):
7 wsdl=open("VanHelsing.wsdl").read()
8 self.send_xml(wsdl)
9
10def AsServer(port=80, services=(), RequestHandlerClass=SOAPRequestHandler):
11 address = ("127.0.0.1",port)
12 sc = ServiceContainer(address, RequestHandlerClass=RequestHandlerClass)
13 for service in services:
14 path = service.getPost()
15 sc.setNode(service,path)
16 sc.serve_forever()
17
18if 1:
19 AsServer(port=8080,services=[ VanHelsing() ], RequestHandlerClass=VanSOAPRequestHandler)
20
Note: See TracBrowser for help on using the repository browser.