1

I am new to SUDS and have no idea why I am getting error while trying to perform a transaction with the WSDL provider. Does it have any thing to do with the way Array is listed in WSDL file?

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)

I am getting the error:

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

Following is the excerpt from the 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>
...
Nathan Villaescusa
  • 15,601
  • 2
  • 49
  • 54

0 Answers0