Python SUDS-raise-TypeNotFound(query.ref)SUDS.TypeNotFound:Type-notfound:';(数组,http://www.w3.org/2001/XMLSchema)及"x27 ;;

Python SUDS-raise-TypeNotFound(query.ref)SUDS.TypeNotFound:Type-notfound:';(数组,http://www.w3.org/2001/XMLSchema)及"x27 ;;,python,soap,suds,Python,Soap,Suds,我不熟悉SUDS,不知道为什么在尝试与WSDL提供者执行事务时出错。它是否与数组在WSDL文件中列出的方式有关 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.

我不熟悉SUDS,不知道为什么在尝试与WSDL提供者执行事务时出错。它是否与数组在WSDL文件中列出的方式有关

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)
以下是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>
...
。。。
购买
...
...

我认为您不需要数组导入的
*
可能与
...
<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>
...