我是网络服务的新手,我真的需要你的帮助。
我有一个现有的WSDL,根据我的研究,最容易使用的是ZSI for python。它有一个 wsdl2py 和 wsdl2dispatch 脚本,它们根据现有的 WSDL 生成代码。我现在有它生成的3个文件(server.py,service.py,services_types.py),我创建了一个客户端(myClient.py)来调用服务中的一个动作。我在service.py
中遇到了问题def Set(self, request):
if isinstance(request, TryService_Set) is False:
raise TypeError, "%s incorrect request type" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction="Set", **kw)
# no output wsaction
response = self.binding.Receive(TryService_SetResponse.typecode)
return response
我得到的错误是:
档案"C:\Python27\lib\urlparse.py", line 182, in urlsplit
i = url.find(':')`
由于这一行:
self.binding.Send(None, None, request, soapaction="Set", **kw)
希望你能开导我,我没有人要问。或者我在做正确的事情,即使用ZSI?
谢谢!