Reputation: 331
I need to use a SOAP service in python and I read about suds so I am using it but I can't move further.
I'm getting an error as soon as I'm creating a Client object.
below is the code
from suds.client import Client
url = 'http://ebay.davismicro.com.cn:9888/api/wishery.php?wsdl'
client = Client(url)
and the error I'm getting is this
Traceback (most recent call last):
File "D:\kshubham\webpractice\alchemytry\apitest1.py", line 12, in <module>
client = Client(url)
File "C:\Python27\lib\site-packages\suds\client.py", line 119, in __init__
sd = ServiceDefinition(self.wsdl, s)
File "C:\Python27\lib\site-packages\suds\servicedefinition.py", line 57, in __init__
self.addports()
File "C:\Python27\lib\site-packages\suds\servicedefinition.py", line 85, in addports
method = (m.name, binding.param_defs(m))
AttributeError: 'NoneType' object has no attribute 'param_defs'
I don't know what I'm doing wrong. Please suggest.
Thanks in advance.
Upvotes: 1
Views: 791
Reputation: 1269
Seems like a bug in suds, give http://docs.python-zeep.org/ a try. It should work, for example:
>>> from zeep import Client
>>> client = Client('http://ebay.davismicro.com.cn:9888/api/wishery.php?wsdl')
>>> client.service.get_globalegrow_sku(start=1, limit=2, sku='foo', identity='bar')
Upvotes: 1