Bonjour,
je debute avec les web service.
voici mon probleme:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
POST /ert/ert HTTP/1.1
Host: services.ert.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
 
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <WinWinSoapHeader xmlns="http://rrr.com/">
      <UserName>string</UserName>
      <Password>string</Password>
    </WinWinSoapHeader>
  </soap12:Header>
  <soap12:Body>
    <GetREActions xmlns="http://rrr.com/">
  </soap12:Body>
</soap12:Envelope>
je voudrais donc ecrire un code client pour acceder au web service
je ne sais pas trop comment faire
j'ai essaye ca
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
$strWsdlUri = "xxxx";
 
$options = array("UserName" => "xxxx",
                "Password" => "xxx");
 
$authvalues = new SoapVar($options, SOAP_ENC_OBJECT);
$objClient = new SoapClient($strWsdlUri);
$authHeader = new SoapHeader("xxxx","WinWinSoapHeader ",$authvalues,false);
 
 
$response = $objClient->GetCities();
mais bien sur je recois une erreur
Uncaught SoapFault exception: [soap:Client] Invalid information in SOAP Header in
je ne c vraiment pas quoi faire
merci d'avance