Line | |
---|
1 | from ZSI.ServiceContainer import ServiceContainer, SOAPRequestHandler
|
---|
2 |
|
---|
3 | from VanHelsing_server import VanHelsing
|
---|
4 |
|
---|
5 | class VanSOAPRequestHandler(SOAPRequestHandler):
|
---|
6 | def do_GET(self):
|
---|
7 | wsdl=open("VanHelsing.wsdl").read()
|
---|
8 | self.send_xml(wsdl)
|
---|
9 |
|
---|
10 | def 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 |
|
---|
18 | if 1:
|
---|
19 | AsServer(port=8080,services=[ VanHelsing() ], RequestHandlerClass=VanSOAPRequestHandler)
|
---|
20 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.