[Web Service] SOAP erreur avec HTTPS
Bonjour,
Je désire créer un client SOAP qui va faire une requête sur un WSDL sur un serveur https et qui demande un login et un password.
Est-ce que je mets mon login, password dans le header du SOAP ou bien dans la déclaration SoapClient ? Et si c'est ce dernier cas, comment je dois faire ?
Voici ce que j'ai fait :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <?php
try {
$wsdl = "https://blabla/WebService?wsdl";
$client = new SoapClient($wsdl,
array(
"proxy_host"=>"blabla.com",
"proxy_port"=>8080
)
);
$client->__setLocation("http://blabla.com/bla");
$requete = 'blablaXML';
echo $client->__doRequest($requete,'http://blabla.com/bla',
'blabla',1.2);
}
catch (Exception $e) {
echo "Erreur : ".$e;
}
?> |
Et voici ce que j'ai comme erreur :
Code:
Erreur : SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://blabla/WebService?wsdl' : failed to load external entity "https://blabla/WebService?wsdl" in C:\wamp\www\tests\paywizard\testSoap.php:14 Stack trace: #0 C:\wamp\www\tests\blabla\testSoap.php(14): SoapClient->SoapClient('https://blabla...', Array) #1 {main}