test(false); } catch (Exception $ex) { $ule = $NS ? "Ice\\UnknownLocalException" : "Ice_UnknownLocalException"; $one = $NS ? "Ice\\OperationNotExistException" : "Ice_OperationNotExistException"; if (!$ex instanceof $ule && !$ex instanceof $one) { throw $ex; } } echo "ok\n"; echo "catching unknown non-Ice exception... "; flush(); try { $thrower->throwNonIceException(); test(false); } catch (Exception $ex) { $ue = $NS ? "Ice\\UnknownException" : "Ice_UnknownException"; if (!$ex instanceof $ue) { throw $ex; } } echo "ok\n"; return $thrower; } $initData = $NS ? eval("return new Ice\\InitializationData;") : eval("return new Ice_InitializationData;"); $initData->properties = Ice_getProperties(); $initData->properties->setProperty("Ice.MessageSizeMax", "10"); $communicator = Ice_initialize($argv, $initData); $thrower = allTests($communicator); $thrower->shutdown(); $communicator->destroy(); exit;
echo "\ntest failed in " . $bt[0]["file"] . " line " . $bt[0]["line"] . "\n"; exit(1); } } $NS = function_exists("Ice\\initialize"); require_once $NS ? 'Ice_ns.php' : 'Ice.php'; // // Load the Demo profile. // $communicator = null; if ($NS) { $initData = eval("return new Ice\\InitializationData;"); $initData->properties = eval("return Ice\\getProperties();"); $communicator = eval("return Ice\\initialize(\$initData);"); } else { $initData = new Ice_InitializationData(); $initData->properties = Ice_getProperties(); $communicator = Ice_initialize($initData); } test($communicator != null); $properties = null; if ($NS) { $properties = eval("return Ice\\getProperties(\"Test\");"); } else { $properties = Ice_getProperties("Test"); } test($properties != null); test($properties->getPropertyAsInt("Ice.Trace.Protocol") == 1); test($properties->getPropertyAsInt("Ice.Trace.Network") == 1); test($properties->getPropertyAsInt("Ice.Warn.Connections") == 1); test($properties->getProperty("Hello.Proxy") == "hello:tcp -h localhost -p 10000");
error_log("IcePHP includes not found. Revise your IcePHP installation."); exit(1); } $includePath = get_include_path(); if (!in_array($iceIncludePath, explode(PATH_SEPARATOR, get_include_path()))) { if ($includePath != '') { $includePath .= PATH_SEPARATOR; } $includePath .= $iceIncludePath; set_include_path($includePath); } require_once 'Ice.php'; require_once dirname(__FILE__) . '/SessionI.php'; require_once dirname(__FILE__) . '/PollingChat.php'; $data = new Ice_InitializationData(); $data->properties = Ice_getProperties(); if ($data->properties->getProperty("PollingChatSessionFactory") == '') { $data->properties->setProperty("Ice.Plugin.IceSSL", "IceSSL:createIceSSL"); $data->properties->setProperty("IceSSL.UsePlatformCAs", "1"); $data->properties->setProperty("IceSSL.CheckCertName", "1"); $data->properties->setProperty("PollingChatSessionFactory", "PollingChatSessionFactory:wss -h zeroc.com -p 443 -r /demo-proxy/chat/poll"); } $communicator = Ice_initialize($data); // // Disable session cookie. // ini_set("session.use_cookies", false); // // Disable transid in urls. // ini_set("session.session.use_transid", false);