In a documentation to connect to an Soap API I have this code in PHP and it works :
define('WSDL_SERVER', 'http://api.belboon.com/?wsdl');
// SOAP options (http://de.php.net/manual/de/soapclient.soapclient.php)
$config = array(
'login' => '',
'password' => '',
'trace' => true
);
try {
$client = new SoapClient(WSDL_SERVER, $config);
$result = $client->getAccountInfo();
echo '<pre>';
print_r($result);
} catch( Exception $e ) {
// Error handling here...
}
I'm trying to do the same with Python and zeep library with this code :
from zeep import Client, Settings
from zeep.transports import Transport
from requests.auth import HTTPBasicAuth
from requests import Session
session = Session()
settings = Settings(strict=False, xml_huge_tree=True)
session.auth = HTTPBasicAuth('', '')
client = Client('http://api.belboon.com/?wsdl', settings=settings, transport=Transport(session=session))
test = client.service.getAccountInfo()
The connection works but I have this exception :
zeep.exceptions.NamespaceError: Unable to resolve type {http://xml.apache.org/xml-soap}Map. No schema available for the namespace 'http://xml.apache.org/xml-soap'.
Do you have any idea why please ? I have made some research but I didn't find any solution for my problem.
Thank you.
Edit: if I use the parameter raw_response=True I have the correct XML answer.