1

我是 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>
...
4

0 回答 0