#!/usr/bin/php
<?php
ini_set("soap.wsdl_cache_enabled", "0");

/* Test d'appel a un WEBService */
$wsdl = 'http://127.0.0.1/~laurent/Horloge.wsdl';
$options = array('trace'=>true, "exceptions" => true, 'cache_wsdl' => WSDL_CACHE_NONE );

try {
	$soapclt = new SoapClient($wsdl, $options);
	$res = $soapclt->QuelleHeure();
	echo "Ok !\n";
	var_dump($res);

	$res = $soapclt->QuelleHeureEtaitIl( time() - 5*60000);
	echo "Ok !\n";
	var_dump($res);

} catch (SoapFault $fault) {
	trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}
?>
