I am a newbie with web services and I really need your help.
I have an existing WSDL, and based on my research, the easiest to use is ZSI for python. It has a wsdl2py and wsdl2dispatch scripts which generates the code based from the existing WSDL. I now have the 3 files it has generated (server.py, service.py, services_types.py) and I have created a client (myClient.py) to call an action in the service. I am having an issue in 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
The error that I get is:
File "C:\Python27\lib\urlparse.py", line 182, in urlsplit
i = url.find(':')`
due to this line:
self.binding.Send(None, None, request, soapaction="Set", **kw)
Hope you can enlighten me, I don't have anyone to ask. Or am I doing the right thing, i.e. using ZSI?
Thanks!