当前位置: 首页>>代码示例>>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;未经允许,请勿转载。