Skip to content
Snippets Groups Projects
Verified Commit b48afe7e authored by Damien's avatar Damien
Browse files

External SB controller

parent 3fbfdfb2
No related branches found
No related tags found
No related merge requests found
...@@ -18,32 +18,33 @@ class IxbusController ...@@ -18,32 +18,33 @@ class IxbusController
public static function getInitializeDatas() public static function getInitializeDatas()
{ {
$xmlPostString = '<?xml version="1.0" encoding="utf-8"?> $xmlPostString = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body> <soap:Body>
<storeResourceRequest xmlns="http://connecting.website.com/WSDL_Service"> <getUtilisateur xmlns="http://www.srci.fr">
<PRICE>tata</PRICE> <NomUtilisateur>toto</NomUtilisateur>
</storeResourceRequest> <MotdePasse>tata</MotdePasse>
</soap:Body> </getUtilisateur>
</soap:Envelope>'; </soap:Body>
</soap:Envelope>';
$opts = [ $opts = [
CURLOPT_URL => '', CURLOPT_URL => 'http://parapheur.orleans.fr/ixbuswebws/Utilisateur.asmx',
CURLOPT_HTTPHEADER => [ CURLOPT_HTTPHEADER => [
'content-type:text/xml;charset=\"utf-8\"', 'content-type:text/xml;charset=\"utf-8\"',
'accept:text/xml', 'accept:text/xml',
"Cache-Control: no-cache", "Cache-Control: no-cache",
"Pragma: no-cache", "Pragma: no-cache",
"SOAPAction: \"http://tracmedia.org/InTheLife\"" "Content-length: ".strlen($xmlPostString),
"SOAPAction: \"http://www.srci.fr/getUtilisateur\""
], ],
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'superadmin:superadmin',
CURLOPT_POST => true, CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $xmlPostString CURLOPT_POSTFIELDS => $xmlPostString
]; ];
$curl = curl_init(); $curl = curl_init();
curl_setopt_array($curl, $opts); curl_setopt_array($curl, $opts);
$rawResponse[] = curl_exec($curl); $rawResponse = curl_exec($curl);
return $rawResponse; return $rawResponse;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment