Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
$client = new SoapClient('http://www.webservice_magento.fr:80/env.wsdl', array('trace' => 1, 'soap_version'  => SOAP_1_1));
                  $O=$client->getProduit('SMK7SFR');
		   $nom = addslashes($O->nom);
		   echo $nom;
J'ai ces erreurs lorsque j'execute le code et je ne sais pas comment les résoudre:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
Warning: SoapClient::SoapClient() [soapclient.soapclient]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/lampp/htdocs/tiger/autocompletion.php on line 7
 
Warning: SoapClient::SoapClient(http://www.webservice_magento.fr:80/env.wsdl) [soapclient.soapclient]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/lampp/htdocs/tiger/autocompletion.php on line 7
 
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://www.webservice_magento.fr:80/env.wsdl" in /opt/lampp/htdocs/tiger/autocompletion.php on line 7
SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.webservice_magento.fr:80/env.wsdl' in /opt/lampp/htdocs/tiger/autocompletion.php:7 Stack trace: #0 /opt/lampp/htdocs/tiger/autocompletion.php(7): SoapClient->SoapClient('http://www.webs...', Array) #1 {main}
Si je met l'adresse "http://www.webservice_magento.fr:80/env.wsdl" dans le navigateur, il me l'ouvre correctement.