我有一个Python脚本,它使用suds0.4.1-3.el6通过SOAP接口与一些第三方软件协同工作。在
在软件更新之前一切都正常。现在所有的脚本都像:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#
import logging
from suds import WebFault
from suds.client import Client
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
client = Client("http://localhost:80/admin/soap/api3.wsdl")
#print client.location
#client.location = 'http://localhost:34012/'
print client
结尾为:
^{pr2}$软件支持人员说“我们的WSDL文件很好,请咨询suds开发人员”,所以我需要帮助来调查这个问题。在
以前的工作文件:
https://dl.dropbox.com/u/4299326/py/20130225.wsdl/old/api3.wsdl
https://dl.dropbox.com/u/4299326/py/20130225.wsdl/old/encoding.xml
新的崩溃文件:
https://dl.dropbox.com/u/4299326/py/20130225.wsdl/new/api3.wsdl
https://dl.dropbox.com/u/4299326/py/20130225.wsdl/new/encoding.xml
我认为这不对。suds显示的
Type not found: '(soapDiscountAddons, http://www.w3.org/2001/XMLSchema, )'
消息是正确的。在通过查看您的WSDL,
soapDiscountAddons
位于urn:api3
命名空间中,因此在使用它时需要提到这一点。问题在于:因为您没有给类型加前缀,所以使用了当前的名称空间}。suds并没有寻找类型为
http://www.w3.org/2001/XMLSchema
,而不是{soapDiscountAddons@urn:api3
的地方,而是试图找到一个当然不存在的soapDiscountAddons@http://www.w3.org/2001/XMLSchema
元素。在这应该可以修复它:
^{pr2}$相关问题 更多 >
编程相关推荐