Esempio n. 1
0
 public function ws()
 {
     $service = new HessianService(new Math());
     $service->handle();
 }
Esempio n. 2
0
        return count($param);
    }
    function testStringToDate($dateISO)
    {
        $dateobj = new DateTime($dateISO);
        return $dateobj;
    }
    function testDateToString($dateTime)
    {
        return $dateTime->format('Y-m-d H:i:s');
    }
    function testFault()
    {
        throw new Exception("Test Fault");
    }
    function testSendFile($filename, $content)
    {
        if (file_exists($filename)) {
            @unlink($filename);
        }
        file_put_contents($filename, $content);
    }
    function testReceiveFile()
    {
        $file = dirname(__FILE__) . '/notok.png';
        return fopen($file, 'r');
    }
}
$testService = new HessianTest();
$server = new HessianService($testService, array('displayInfo' => true));
$server->handle();