J'essaye de faire un appel non-WSDL dans PHP (5.2.5) comme ceci. Je suis sûr qu'il me manque quelque chose de simple. Cet appel a un paramètre, une chaîne, appelée "fuseau horaire":PHP Soap appel non-WSDL: comment passez-vous les paramètres?
$URL = 'http://www.nanonull.com/TimeService/TimeService.asmx';
$client = new SoapClient(null, array(
'location' => $URL,
'uri' => "http://www.Nanonull.com/TimeService/",
'trace' => 1,
));
// First attempt:
// FAILS: SoapFault: Object reference not set to an instance of an object
$return = $client->__soapCall("getTimeZoneTime",
array(new SoapParam('ZULU', 'timezone')),
array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
);
// Second attempt:
// FAILS: Generated soap Request uses "param0" instead of "timezone"
$return = $client->__soapCall("getTimeZoneTime",
array('timezone'=>'ZULU'),
array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
);
Merci pour toutes suggestions
-Dave
Essayé, mais il passe le tableau entier comme param0. Alors pas d'aller. –