SUDS提高TypeNotFound(query.ref)suds.TypeNotFound:类型未

2019-10-17 07:56发布

我是新来的肥皂水和不知道,而试图与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)

我得到的错误:

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>
...
文章来源: SUDS raise TypeNotFound(query.ref) suds.TypeNotFound: Type not found: '(Array, http://www.w3.org/2001/XMLSchema, )'
标签: python soap suds