我正在尝试几个不同的 Python SOAP 服务器库,但我似乎无法让spyne的“hello world”示例工作: https ://github.com/arskom/spyne/blob/master/examples/ helloworld_soap.py
当我运行它时,它会启动一个 SOAP 服务器,我可以在浏览器中成功地查看 WSDL http://localhost:7789/?wsdl
。但是,当我尝试连接 suds 客户端时,出现异常:
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from suds.client import Client
>>> c = Client('http://localhost:7789/?wsdl')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/acordiner/ve/local/lib/python2.7/site-packages/suds/client.py", line 112, in __init__
self.wsdl = reader.open(url)
File "/home/acordiner/ve/local/lib/python2.7/site-packages/suds/reader.py", line 152, in open
d = self.fn(url, self.options)
File "/home/acordiner/ve/local/lib/python2.7/site-packages/suds/wsdl.py", line 158, in __init__
self.resolve()
File "/home/acordiner/ve/local/lib/python2.7/site-packages/suds/wsdl.py", line 207, in resolve
c.resolve(self)
File "/home/acordiner/ve/local/lib/python2.7/site-packages/suds/wsdl.py", line 661, in resolve
self.resolveheaders(definitions, op)
File "/home/acordiner/ve/local/lib/python2.7/site-packages/suds/wsdl.py", line 725, in resolveheaders
raise Exception, "message'%s', not-found" % mn
Exception: message's0:SomeObject', not-found
我可能做错了什么?我正在使用 spyne 2.9.4 和 suds 0.4。