我有一个Windows 7机器上运行的Web服务ASP.NET。 我有两个Linux系统(Ubuntu的12.04),我试图打从web服务,使用Python 2.7.3和肥皂水0.4。 我试图执行的脚本如下:
from suds import client
from suds.transport.https import WindowsHttpAuthenticated
url = "https://webserver.mydomain.com/webservice/services.asmx?WSDL"
ntlm = WindowsHttpAuthenticated(username = "user", password = "pwd")
c = client.Client(url, transport = ntlm)
resp = c.service.GetData()
在我的Linux机器之一,该代码执行完美, resp
将包含从Web服务返回预期的数据。 而Linux中,我得到以下错误信息:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/www/dev/local/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
return client.invoke(args, kwargs)
File "/var/www/dev/local/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/var/www/dev/local/lib/python2.7/site-packages/suds/client.py", line 643, in send
result = self.succeeded(binding, reply.message)
File "/var/www/dev/local/lib/python2.7/site-packages/suds/client.py", line 678, in succeeded
reply, result = binding.get_reply(self.method, reply)
File "/var/www/dev/local/lib/python2.7/site-packages/suds/bindings/binding.py", line 149, in get_reply
soapenv.promotePrefixes()
AttributeError: 'NoneType' object has no attribute 'promotePrefixes'
我需要什么设置等一些想法可能会导致在两台机器之间的这种行为差异。 提前致谢!