2011-03-30 14:04:17 +00:00
|
|
|
<?php
|
2011-04-06 13:13:14 +00:00
|
|
|
/**
|
|
|
|
* Fonction de switche entre les méthodes de Giant.
|
|
|
|
*
|
|
|
|
* @param $name
|
|
|
|
* @param $structure
|
|
|
|
* @param $soap_client
|
|
|
|
*/
|
2011-03-30 14:04:17 +00:00
|
|
|
function SwitchWSDLFunction($name, &$structure, &$soap_client)
|
|
|
|
{
|
2011-04-11 12:31:46 +00:00
|
|
|
$CatchError = new SOAPCatchError();
|
|
|
|
|
|
|
|
try {
|
|
|
|
switch ($name)
|
|
|
|
{
|
|
|
|
case 'Search':
|
|
|
|
return ($soap_client->Search($structure));
|
|
|
|
break;
|
|
|
|
case 'AdvancedSearch':
|
|
|
|
return ($soap_client->AdvancedSearch($structure));
|
|
|
|
break;
|
|
|
|
case 'RetrieveOptions':
|
|
|
|
$soap_client->RetrieveOptions($structure);
|
|
|
|
break;
|
|
|
|
case 'OrderDataSet':
|
|
|
|
return ($soap_client->OrderDataSet($structure));
|
|
|
|
break;
|
|
|
|
case 'RetrieveDataSet':
|
|
|
|
return ($soap_client->RetrieveDataSet($structure));
|
|
|
|
break;
|
|
|
|
case 'Ping':
|
|
|
|
return ($soap_client->Ping($structure));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return (EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
} catch (SoapFault $fault) {
|
|
|
|
$CatchError->_printInLogs($fault->detail);
|
|
|
|
if(_DEBUG_MODE_)
|
|
|
|
{
|
|
|
|
echo '<b>__getLastRequest return : </b><br /><xmp>';
|
|
|
|
echo $soap_client->__getLastRequest().'</xmp>';
|
|
|
|
echo '<br /><b>__getLastResponse return : </b><br /><xmp>';
|
|
|
|
echo $soap_client->__getLastResponse().'</xmp>';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
echo $CatchError->_getMessage();
|
|
|
|
exit;
|
2011-03-30 14:04:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|