我正在尝试使用似乎使用SoapUI正常工作的Web服务调用函数,但不能使用pysimplesoap。 WSDL具有以下功能:
Name: getAvailableDates
Input {'getAvailableDates': {u'criteria': {u'id': <type 'str'>, u'appointmentDurationMin': <type 'int'>}, u'numberOfSlots': <type 'int'>}}
但是当我这样调用它时:
client.getAvailableDates(criteria={'id' : '1', 'appointmentDurationMin' : 60}, numberOfSlots=10)
但它总是会返回一个我不明白的神秘错误:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/env/lib/python2.7/site-packages/pysimplesoap/client.py", line 181, in <lambda>
return lambda *args, **kwargs: self.wsdl_call(attr, *args, **kwargs)
File "/env/lib/python2.7/site-packages/pysimplesoap/client.py", line 346, in wsdl_call
return self.wsdl_call_with_args(method, args, kwargs)
File "/env/lib/python2.7/site-packages/pysimplesoap/client.py", line 370, in wsdl_call_with_args
response = self.call(method, *params)
File "/env/lib/python2.7/site-packages/pysimplesoap/client.py", line 269, in call
fault = operation['faults'][detailXml.children()[0].get_name()]
KeyError: u'ns2:TTServiceException'
关于我可能做错了什么的想法?感谢任何帮助。