from ZSI.ServiceContainer import ServiceContainer, SOAPRequestHandler from ZSI.schema import LocalElementDeclaration, ElementDeclaration, TypeDefinition, GTD, GED from VanHelsing_server import VanHelsing ResourceInfo= GTD("http://www.dass-it.de/VanHelsing/", "ResourceInfo")(None).pyclass() print ResourceInfo class VanSOAPRequestHandler(SOAPRequestHandler): def do_GET(self): wsdl=open("VanHelsing.wsdl").read() self.send_xml(wsdl) def AsServer(port=80, services=(), RequestHandlerClass=SOAPRequestHandler): address = ("127.0.0.1",port) sc = ServiceContainer(address, RequestHandlerClass=RequestHandlerClass) for service in services: path = service.getPost() sc.setNode(service,path) sc.serve_forever() class RealVanHelsing(VanHelsing): def soap_listResources(self, ps, **kw): request,response=VanHelsing.soap_listResources(self,ps) resInf=ResourceInfo() response._resourceList=[ resInf ] print response._resourceList return request,response if 1: AsServer(port=8080,services=[ RealVanHelsing() ], RequestHandlerClass=VanSOAPRequestHandler)