I am trying to consume with Python a WSDL created in PHP.
Fragment of the Service:
require_once('lib/nusoap.php');
date_default_timezone_set('America/Mexico_City');
function Sum($numbers){
return array_sum($numbers);
}
...
Client:
from suds.client import Client
def wsarchivo():
url = "http://localhost/PracticeSumArray/server.php?wsdl"
client = Client(url)
res = client.service.Sum([1,2,3])
print(res)
wsarchivo()
But when running it does not work to send the parameter in this way, unlike doing it with a client in PHP that the way to send the parameter would be 'numbers' => array (1, 2, 3)
and works correctly .