public function actionIndex()
 {
     $communicator = null;
     try {
         $communicator = \Ice\initialize();
         $proxy = $communicator->stringToProxy("TicketService:tcp -h 127.0.0.1 -p 8888");
         $TicketService = \ticket\TicketServicePrxHelper::checkedCast($proxy);
         $list = $TicketService->queryMyOrders('13916969166');
         return $this->render('index', array('list' => $list));
     } catch (\Ice\LocalException $ex) {
         print_r($ex);
     }
     if ($communicator) {
         try {
             $communicator->destroy();
         } catch (\Ice\LocalException $ex) {
             var_dump($ex);
         }
     }
 }
Exemple #2
0
</HEAD>
<BODY>

    <H1>Hello Demo</H1>

<?php 
// **********************************************************************
//
// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
//
// **********************************************************************
require_once 'Ice_ns.php';
require_once 'Hello.php';
$initData = new Ice\InitializationData();
$initData->properties = Ice\getProperties();
$communicator = Ice\initialize($initData);
//
// Change this to true if SSL is configured for the PHP extension.
//
$have_ssl = false;
if (isset($_POST["submitted"])) {
    echo "<HR>\n";
    echo "<P>Status:<BR><B>\n";
    try {
        $p = $communicator->stringToProxy("hello");
        if (isset($_POST["mode"])) {
            if ($_POST["mode"] == "oneway") {
                $p = $p->ice_oneway();
            } elseif ($_POST["mode"] == "datagram") {
                $p = $p->ice_datagram();
            }
Exemple #3
0
<BODY>

    <H1>Hello Demo</H1>

<?php 
// **********************************************************************
//
// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
require_once 'Ice_ns.php';
require_once 'Hello.php';
$ICE = Ice\initialize();
//
// Change this to true if SSL is configured for the PHP extension.
//
$have_ssl = false;
if (isset($_POST["submitted"])) {
    echo "<HR>\n";
    echo "<P>Status:<BR><B>\n";
    try {
        if ($have_ssl) {
            $p = $ICE->stringToProxy("hello:tcp -p 10000:udp -p 10000:ssl -p 10001");
        } else {
            $p = $ICE->stringToProxy("hello:tcp -p 10000:udp -p 10000");
        }
        if (isset($_POST["mode"])) {
            if ($_POST["mode"] == "oneway") {