【发布时间】:2012-07-18 00:33:15
【问题描述】:
尝试使用 echosign SOAP API。
wsdl 在这里:https://secure.echosign.com/services/EchoSignDocumentService14?wsdl
当我尝试创建某些对象时,它似乎无法找到类型,即使在 print client 中列出它之后也是如此
import suds
url = "https://secure.echosign.com/services/EchoSignDocumentService14?wsdl"
client = suds.client.Client(url)
print client
Service ( EchoSignDocumentService14 ) tns="http://api.echosign"
Prefixes (10)
ns0 = "http://api.echosign"
ns1 = "http://dto.api.echosign"
ns2 = "http://dto10.api.echosign"
ns3 = "http://dto11.api.echosign"
ns4 = "http://dto12.api.echosign"
ns5 = "http://dto13.api.echosign"
ns15 = "http://dto14.api.echosign"
ns16 = "http://dto7.api.echosign"
ns17 = "http://dto8.api.echosign"
ns18 = "http://dto9.api.echosign"
Ports (1):
(EchoSignDocumentService14HttpPort)
Methods (45):
...
Types (146):
ns1:CallbackInfo
ns17:WidgetCreationInfo
为简洁起见,但显示了命名空间和我现在关心的 2 种类型。
尝试运行WCI = client.factory.create("ns17:WidgetCreationInfo") 会产生此错误:
client.factory.create("ns17:WidgetCreationInfo") 回溯(最近一次通话最后): 文件“”,第 1 行,在 文件“build/bdist.macosx-10.7-intel/egg/suds/client.py”,第 244 行,在创建中 suds.BuildError: 构建 (ns17:WidgetCreationInfo) 的实例时发生错误。因此 无法构造您请求的对象。推荐 您使用 Suds 对象手动构造类型。 请打开一张带有此错误描述的工单。 原因:找不到类型:'(CallbackInfo, http://dto.api.echosign, )'
所以它似乎无法找到 CallbackInfo 类型。也许是因为它缺少那里的ns?
【问题讨论】: