Changeset 836 for vanHelsing/trunk/src/VanHelsingServer.py
- Timestamp:
- Mar 12, 2010, 2:28:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vanHelsing/trunk/src/VanHelsingServer.py
r826 r836 2 2 from ZSI.schema import LocalElementDeclaration, ElementDeclaration, TypeDefinition, GTD, GED 3 3 from VanHelsing_server import VanHelsing 4 from VanHelsing_types import ns0 5 import VanHelsingWrapper 6 import sys 4 7 5 8 ResourceInfo= GTD("http://www.dass-it.de/VanHelsing/", "ResourceInfo")(None).pyclass() 6 print ResourceInfo 9 listResourcesType= GTD("http://www.dass-it.de/VanHelsing/", "listResourcesType")(None).pyclass() 10 #print dir(ResourceInfo) 7 11 8 12 class VanSOAPRequestHandler(SOAPRequestHandler): … … 23 27 def soap_listResources(self, ps, **kw): 24 28 request,response=VanHelsing.soap_listResources(self,ps) 25 resInf=ResourceInfo()26 response._resourceList=[ resInf ]27 29 28 print response._resourceList 30 resType=request.get_element_resourceType() 31 resDirector=request.get_element_director() 32 33 result=VanHelsingWrapper.getResources(resDirector,resType) 34 35 rList=[] 36 37 for rid,name in result: 38 39 resInf=response.new_resourceList() 40 resInf.set_element_director(resDirector) 41 resInf.set_element_resId(rid) 42 resInf.set_element_resType(resType) 43 resInf.set_element_resName(name) 44 rList.append(resInf) 45 46 response.set_element_resourceList(rList) 47 29 48 return request,response 30 49 31 50 if 1: 51 if len(sys.argv) < 2: 52 filename="test.conf" 53 else: 54 filename=sys.argv[1] 55 56 VanHelsingWrapper.loadDirectorConfig(filename) 57 32 58 AsServer(port=8080,services=[ RealVanHelsing() ], RequestHandlerClass=VanSOAPRequestHandler) 33 59
Note:
See TracChangeset
for help on using the changeset viewer.