'.
''.
''.INFOGREFFE_WS_USER.''.//85009006
''.INFOGREFFE_WS_PASS.''.//
''.INFOGREFFE_WS_REF.''.
''.
'A'.
'IC'.
'C'.
''.$type.''.// KB=Kbis, HQ=Histo, ST=Statut, AC=Acte, LE=Liste étab
'S'.
'WS'.
''.
''.
''.
''.
''.
''.
''.$siren.''.
'';
$req = utf8_encode($req);
$client2 = new SoapClient(null, array(
'location' => INFOGREFFE_WS_URL,
'uri' => INFOGREFFE_WS_URI,
'soap_version' => SOAP_1_1,
'trace' => 1,
'style' => SOAP_RPC,
'use' => SOAP_ENCODED,
));
try {
$O = $client2->getProduitsWebServicesXML($req);
$xml = implode('', (array)$O);
}catch (SoapFault $soapFault) {
$success = false;
$response = $client2->__getLastResponse();
$response = str_replace("",'', $response);
$xml = str_replace('','', $response);
}
/*
$post = ''.$req.'';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_COOKIEFILE,TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$output = curl_exec($ch);
$xml = str_replace("",'', $output);
$xml = str_replace('','', $xml);
*/
return $xml;
}
function getKbis($siren){
global $client;
//ini_set('default_socket_timeout', 120); //timeout 2 min
$return = FALSE;
try {
$O = $client->getKbis($siren, 1,0);
$kbis = $O['result'];
$return = $kbis['Url'];
} catch (SoapFault $fault) {
require_once 'soaperror.php';
processSoapFault($client,$fault,$_SESSION['tabInfo']);
}
return $return;
}