當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Soap_Server::setObject方法代碼示例

本文整理匯總了PHP中Zend_Soap_Server::setObject方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Soap_Server::setObject方法的具體用法?PHP Zend_Soap_Server::setObject怎麽用?PHP Zend_Soap_Server::setObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Soap_Server的用法示例。


在下文中一共展示了Zend_Soap_Server::setObject方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: indexAction

 public function indexAction()
 {
     if ($this->getRequest()->query->has("wsdl")) {
         $soap = new \Zend_Soap_AutoDiscover("Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex");
         $soap->setUri($this->getRequest()->getUriForPath("/search"))->setClass('\\Server\\CodeSearchBundle\\Libraries\\SoapFacade');
     } else {
         $soap = new \Zend_Soap_Server($this->getRequest()->getUri() . "?wsdl");
         $soap->setObject($this->get('SoapFacade'));
     }
     $response = new Response();
     $response->headers->set('Content-Type', 'text/xml; charset=UTF-8');
     ob_start();
     $soap->handle();
     $response->setContent(ob_get_clean());
     return $response;
 }
開發者ID:niutech,項目名稱:SOA,代碼行數:16,代碼來源:SearchController.php

示例2: soap

 /**
  * Accept the request of the clients
  * 
  * @param string $classname
  */
 public function soap($classname)
 {
     if (empty($classname)) {
         return false;
     }
     list($app, $module, $class) = explode("_", $classname);
     // initialize server and set URI
     $optionsoap = array('location' => "http://" . $_SERVER['HTTP_HOST'] . "/" . strtolower($class) . ".wsld", 'uri' => 'urn:' . $classname);
     $server = new Zend_Soap_Server(null, $optionsoap);
     // set SOAP service class
     $server->setClass($classname);
     // Bind already initialized object to Soap Server
     $server->setObject(new $classname());
     $server->setReturnResponse(false);
     // register exceptions for generating SOAP faults
     $server->registerFaultException(array('Shineisp_Api_Exceptions'));
     // handle request
     $server->handle();
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:24,代碼來源:Action.php

示例3: testGetFunctionsWithObjectAttached

 public function testGetFunctionsWithObjectAttached()
 {
     $server = new Zend_Soap_Server();
     $server->setObject(new Zend_Soap_Server_TestClass());
     $this->assertEquals(array('testFunc1', 'testFunc2', 'testFunc3', 'testFunc4', 'testFunc5'), $server->getFunctions());
 }
開發者ID:omusico,項目名稱:logica,代碼行數:6,代碼來源:ServerTest.php

示例4: dirname

 * external APPs to allow remote access.
 *
 * Please read the following page to know how this server works:
 * http://framework.zend.com/manual/en/zend.soap.server.html
 *
 * @author Kevin Papst <kpapst@gmx.net>
 */
// Bootstrap Kimai
require dirname(__FILE__) . "/../includes/basics.php";
ini_set('soap.wsdl_cache_enabled', 0);
// @TODO
ini_set('soap.wsdl_cache_dir', APPLICATION_PATH . '/temporary/');
// @TODO
ini_set('soap.wsdl_cache', WSDL_CACHE_NONE);
// WSDL_CACHE_DISK
ini_set('soap.wsdl_cache_ttl', 0);
// cache lifetime
// @TODO check what works better, with or without?
//$soapOpts = array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8'/*, 'uri' => $wsdlUrl*/);
$soapOpts = array();
if (isset($_GET['wsdl']) || isset($_GET['WSDL'])) {
    $autodiscover = new Zend_Soap_AutoDiscover();
    $autodiscover->setClass('Kimai_Remote_Api');
    $autodiscover->handle();
} else {
    $wsdlUrl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '?wsdl';
    $server = new Kimai_Remote_Api();
    $soap = new Zend_Soap_Server($wsdlUrl, $soapOpts);
    $soap->setObject($server);
    $soap->handle();
}
開發者ID:kimai,項目名稱:kimai,代碼行數:31,代碼來源:soap.php

示例5: rgProductOfferedAction

 /**
  * Fetches all the products for RG
  */
 public function rgProductOfferedAction()
 {
     $params = Zend_Registry::get('params');
     //$this->enforceSecurity();
     if (isset($_GET['wsdl'])) {
         $autoDiscover = new Zend_Soap_AutoDiscover();
         $autoDiscover->setUri($params->homelet->domain . '/soap/rg-product-offered');
         $autoDiscover->setClass('Service_Core_RGProductOfferedAccessor');
         $autoDiscover->handle();
     } else {
         // Disable all layouts
         $this->getHelper('viewRenderer')->setNoRender(true);
         // initialize server and set URI
         $server = new Zend_Soap_Server(null, array('uri' => $params->homelet->domain . '/soap/rg-product-offered'));
         // set SOAP service class
         $server->setClass('Service_Core_RGProductOfferedAccessor');
         $server->setObject(new Manager_Core_RGProductOffered());
         // handle request
         $server->handle();
     }
 }
開發者ID:AlexEvesDeveloper,項目名稱:hl-stuff,代碼行數:24,代碼來源:IndexController.php

示例6: VerifyStream

        $Message = com_create_guid();
        return $Message;
    }
    /**
     *
     * @param string $UserID
     * @param string $StreamID
     * @return boolean
     */
    public function VerifyStream($UserID, $StreamID)
    {
        //check if UserID and StreamID are vaild
        return true;
    }
}
//Subscriber
if (isset($_GET['wsdl'])) {
    $autodiscover = new Zend_Soap_AutoDiscover();
    $autodiscover->setClass("MyService");
    $autodiscover->handle();
    //Publisher
} else {
    $server = new Zend_Soap_Server($serviceURL . "?wsdl");
    $server->setClass('MyService');
    $server->setObject(new MyService());
    $server->handle();
}
?>


開發者ID:BGCX067,項目名稱:fall2011-cis553-svn-to-git,代碼行數:28,代碼來源:AuthWebService.php


注:本文中的Zend_Soap_Server::setObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。