SUDS引发TypeNotFound(query.ref)suds.TypeNotFound:未找到类型:'(Array,http://www.w3.org/2001/XMLSchema,)'

时间:2012-10-13 22:25:59

标签: python soap suds

我是SUDS的新手,并且在尝试使用WSDL提供程序执行事务时不知道为什么会出现错误。是否与WSDL文件中列出的Array的方式有关?

import suds, sys
import urllib
import logging
from array import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)
url3 = "http://api.secretco.co.np/nusoap-transactions.php?wsdl"
client = suds.client.Client(url3)
countryiso2 = 'NP'
apikey = '<API-KEY>'
response = client.service.purchase(countryiso2=countryiso2, apikey=apikey)

我收到错误:

SUDS raise TypeNotFound(query.ref) suds.TypeNotFound: Type not found: '(Array, http://www.w3.org/2001/XMLSchema, )'

以下是WSDL的摘录

...
<operation name="purchase">
<documentation>Purchase</documentation>
<input message="tns:purchaseRequest"/>
<output message="tns:purchaseResponse"/>
</operation>
...
<message name="purchaseResponse">
<part name="return" type="xsd:Array"/>
</message>
...

0 个答案:

没有答案