36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
<?php
|
|
// --------------------------------------------------------------------------- //
|
|
// Teste internationalCompanyMonitoringEventsService
|
|
// --------------------------------------------------------------------------- //
|
|
if (defined('NDEBUG') == false) {
|
|
define( 'NDEBUG', '1'); // Ne pas changer cette valeur, voir le client
|
|
define('VERSION', '1.0');
|
|
}
|
|
|
|
if (NDEBUG) {
|
|
$serveur =
|
|
new SoapServer('http://extranet.devlocal.com/services/'.
|
|
'wsdl/monitor-events-service-1.0.wsdl',
|
|
array('soap_version' => SOAP_1_1,
|
|
'trace' => true));
|
|
$serveur->addFunction('SignalMonitoringEvents');
|
|
$serveur->handle();
|
|
}
|
|
|
|
// --------------------------------------------------------------------------- //
|
|
// SignalMonitoringEvents
|
|
// --------------------------------------------------------------------------- //
|
|
function SignalMonitoringEvents($o)
|
|
{
|
|
//$e = new StdClass;
|
|
//$e->ErrorCode = 9000;
|
|
//$e->ErrorMessage = print_r($o, true);
|
|
//throw new SoapFault('FunctionalError', print_r($e, true));
|
|
|
|
$r = new StdClass;
|
|
$r->NumberOfEventsReceived = count($o->MonitoringEvents->MonitoringEvent);
|
|
$r->version = VERSION;
|
|
return $r;
|
|
}
|
|
?>
|