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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
$wsdl = "http://192.168.0.19:7006/gce160/services/literal/businessViewService?wsdl";
//SOAP ENVELOPPE
$body = '<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:GCE" xmlns:com="http://www.generix.fr/technicalframework/businesscomponent/applicationmodule/common" xmlns:ser="http://www.generix.fr/technicalframework/business/webservice/server">
<soapenv:Header/>
<soapenv:Body>
<urn:execute>
<com:ctx entity="1000" language="FRA" target="VINT" user="monuser" password="monpassword"/>
<com:BusinessViewServiceexecuteIn>
<com:context>
<com:entity>1000</com:entity>
<com:identification>
<com:code>CODE</com:code>
</com:identification>
</com:context>
<com:businessView>VAD_SERV_APPEL_DISPO</com:businessView>
<com:cinematic>forward(0)</com:cinematic>
<com:param name="chp:Reference" value="AG100ROH"/>
<com:param name="chp:Qtecde" value="10"/>
</com:BusinessViewServiceexecuteIn>
</urn:execute>
</soapenv:Body>
</soapenv:Envelope>';
//Header SOAP request
$headers = array(
'Content-Type: text/xml; charset="utf-8"',
'Content-Length: '.strlen($body),
'Accept: text/xml',
'Cache-Control: no-cache',
'Pragma: no-cache',
'SOAPAction: "customerSearch"'
);
//Curl init
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, $wsdl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERAGENT, 'php_script');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$data = curl_exec($ch); |
Partager