Je voudrais écrire un client php me permettant d'accéder à un webservice en soap avec un fichier WSDL au moyen de l'extension PHP::SOAP.
J'arrive à me connecter au WSDL avec
$client = new SoapClient(
'http://rsat.scmbb.ulb.ac.be/rsat/web_services/RSATWS.wsdl',
array(
'trace' => 1,
'soap_version' => SOAP_1_1,
'style' => SOAP_RPC,
'encoding' => SOAP_LITERAL
)
La preuve, je peux utiliser les fonctions :
$arFunctions = $client->__getFunctions(); $arTypes = $client->__getTypes();
Pour avoir accès au service ConvertGraphRequest qui prend le arguments suivants (un complextype)
string informat; string outformat; string inputgraph; int wcol; int scol; int tcol; int eccol; int sccol; int tccol; int undirected; int layout;
J'utilise la commande suivante :
$parameters[0] = $in_format; $parameters[1] = $out_format; $parameters[2] = $graph; $parameters[3]; $parameters[4] = $s_col; $parameters[5] = $t_col; $echoed = $client->convert_graph($parameters);
mais j'obtiens l'erreur suivante
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'request' property in /home/rsat/rsa-tools/public_html/convert_graph.php:70
Stack trace:
#0 [internal function]: SoapClient->__call('convert_graph', Array)
#1 /home/rsat/rsa-tools/public_html/convert_graph.php(70): SoapClient->convert_graph(Array)
#2 {main}
thrown in /home/rsat/rsa-tools/public_html/convert_graph.php on line 70
Je pense que c'est dû au fait que je n'arrive pas à passer les complextype en arguments et je n'ai aucune idée de la manière de procéder!
Toutes les aides sont bienvenues!
Merci à tous,
Sylvain
