Bonjour,
je debute avec les web service.
voici mon probleme:
je voudrais donc ecrire un code client pour acceder au web service
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
17POST /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 ne sais pas trop comment faire
j'ai essaye ca
mais bien sur je recois une erreur
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();
je ne c vraiment pas quoi faireUncaught SoapFault exception: [soap:Client] Invalid information in SOAP Header in
merci d'avance
Partager