extranet/www/pages_saisie/getIdentiteMandataire.php

27 lines
633 B
PHP

<?php
$siren = isset($_REQUEST['siren'])? $_REQUEST['siren'] : '';
if ( $siren=='' || strlen($siren)<9 || strlen($siren)>9 ) exit;
session_start();
$client = new SoapClient(null, array( 'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => WEBSERVICE_URL,
'uri' => WEBSERVICE_URI,
'login' => $_SESSION['tabInfo']['login'],
'password' => $_SESSION['tabInfo']['password'],
));
$tabEntrep=array();
try {
$O = $client->getIdentite($siren);
$tabEntrep=$O['result'];
} catch (SoapFault $fault) {
}
//Retourner le tableau sous forme json
echo json_encode($tabEntrep);
?>