当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Soap_Server类代码示例

本文整理汇总了PHP中Zend_Soap_Server的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Soap_Server类的具体用法?PHP Zend_Soap_Server怎么用?PHP Zend_Soap_Server使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Zend_Soap_Server类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ini_set

<?php

ini_set("soap.wsdl_cache_enabled", 0);
ini_set("soap.wsdl_cache_dir", "/tmp");
ini_set("soap.wsdl_cache_ttl", 86400);
if (isset($_GET['wsdl'])) {
    $autodiscover = new Zend_Soap_AutoDiscover();
    $autodiscover->setBindingStyle(array('style' => 'rpc'));
    $autodiscover->setOperationBodyStyle(array('use' => 'literal'));
    $autodiscover->setClass('ProviderWebServiceSyncUnits');
    $data = file_get_contents('php://input');
    $autodiscover->handle($data);
} else {
    $server = new Zend_Soap_Server(__URLSERVERAPP__ . '/webservices/unidades/server.php?wsdl', array('cache_wsdl' => false));
    $server->setClass('ProviderWebServiceSyncUnits');
    $server->setPersistence(SOAP_PERSISTENCE_REQUEST);
    $data = file_get_contents('php://input');
    $server->handle($data);
}
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:19,代码来源:server.php

示例2: soapAction

 public function soapAction()
 {
     $this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8', true);
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout()->disableLayout();
     $version = $this->getRequest()->getParam('version');
     $wsdl = $this->getRequest()->getParam('wsdl');
     $service = 'Auth_Service_Ldap';
     if ($wsdl) {
         $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
         $autodiscover->setUri(ZendT_Url::getUri());
         $autodiscover->setClass($service);
         $autodiscover->handle();
     } else {
         if (!$version) {
             $version = '1_0';
         }
         $fileWsdl = APPLICATION_PATH . '/modules/auth/services/Ldap/version_' . $version . '.wsdl';
         if (file_exists($fileWsdl)) {
             $wsdl = str_replace("\\", "/", $fileWsdl);
         } else {
             $wsdl = ZendT_Url::getUri() . '?wsdl=1';
         }
         $server = new Zend_Soap_Server();
         $server->setWsdl($wsdl);
         $server->setClass($service);
         $server->handle();
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:29,代码来源:LogonController.php

示例3: soapAction

 public function soapAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout()->disableLayout();
     $params = $this->getRequest()->getParams();
     if (!isset($params['version'])) {
         $params['version'] = '1.0';
     }
     $service = 'Ged_Service_FileSystem';
     $this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8', true);
     if (isset($params['wsdl'])) {
         $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
         $autodiscover->setUri(ZendT_Url::getUri());
         $autodiscover->setClass($service);
         $autodiscover->handle();
     } else {
         $version = str_replace('.', '_', $params['version']);
         $names = explode('_', $service);
         $fileWsdl = APPLICATION_PATH . '/modules/' . strtolower($names[0]) . '/' . strtolower($names[1]) . 's/' . $names[2] . '/wsdl/' . $names[2] . '_v' . $version . '.wsdl';
         if (file_exists($fileWsdl)) {
             $wsdl = str_replace("\\", "/", $fileWsdl);
         }
         $server = new Zend_Soap_Server();
         $server->setWsdl($wsdl);
         $server->setClass($service);
         $server->handle();
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:28,代码来源:FileSystemController.php

示例4: soap

 public function soap()
 {
     $vs_wsdl = $this->request->config->get("site_host") . __CA_URL_ROOT__ . "/service.php/usercontent/UserContent/soapWSDL";
     $vo_soapserver = new Zend_Soap_Server($vs_wsdl, array("soap_version" => SOAP_1_2));
     $vo_soapserver->setClass('UserContentService', $this->request);
     $this->view->setVar("soap_server", $vo_soapserver);
     $this->render("usercontent_soap.php");
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:8,代码来源:UserContentController.php

示例5: handleSOAP

 /**
  * function SOAP Handle. points to Np_Soap_Handler 
  * the class for the used for the soap method called .
  * 
  * @return bool $result The Result of the SOAP Handle Function
  * 
  */
 private function handleSOAP()
 {
     $soap = new Zend_Soap_Server(Application_Model_General::getWsdl(), array('soap_version' => SOAP_1_1));
     $soap->setClass('Np_Soap_Handler');
     $soap->handle();
     $response = $soap->getLastResponse();
     return $response;
     // - change to result from handle
 }
开发者ID:carriercomm,项目名称:NPG,代码行数:16,代码来源:ProviderController.php

示例6: soap

 public function soap()
 {
     if ($this->opb_disable) {
         return "";
     }
     $vs_wsdl = $this->request->config->get("site_host") . __CA_URL_ROOT__ . "/service.php/accesscontrol/AccessControl/soapWSDL";
     $vo_soapserver = new Zend_Soap_Server($vs_wsdl, array("soap_version" => SOAP_1_2));
     $vo_soapserver->setClass('AccessControlService', $this->request);
     $this->view->setVar("soap_server", $vo_soapserver);
     $this->render("accesscontrol/accesscontrol_soap.php");
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:11,代码来源:AccessControlController.php

示例7: indexAction

 public function indexAction()
 {
     $this->_helper->viewRenderer->setNoRender(true);
     $this->_helper->layout()->disableLayout();
     // initialize server and set URI
     $server = new Zend_Soap_Server(null, array('uri' => 'http://painel.local/webservice/index'));
     // set SOAP service class
     $server->setClass('App_Webservice_Imagem');
     // handle request
     $server->handle();
 }
开发者ID:powman,项目名称:zfpadrao,代码行数:11,代码来源:IndexController.php

示例8: processServer

 public function processServer()
 {
     if (!$_SERVER['REMOTE_ADDR'] == $this->helpers->config('client_ip')) {
         header('HTTP/1.0 403 Forbidden');
         return _arNone();
     }
     $soap = new Zend_Soap_Server($this->url('soapserver|soap|WSDL'));
     $soap->setUri($this->url('soapserver|soap|Server'));
     $soap->setClass('soapserverservice');
     $soap->setWsdlCache(false);
     $soap->handle();
     return _arNone();
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:13,代码来源:soap.actiongroup.php

示例9: __call

 /**
  * Handle requests regarding users
  *
  * @return void
  */
 public function __call($function, $params)
 {
     $action = strtolower(str_replace('Action', '', $function));
     $class = 'ShortUrl_Api_' . ucfirst($action);
     if (!@(include_once str_replace('_', '/', $class) . '.php')) {
         throw new ShortUrl_Api_ClassNotFoundException($class);
     }
     if (isset($_GET['wsdl'])) {
         $autodiscover = new Zend_Soap_AutoDiscover();
         $autodiscover->setClass($class)->handle();
     } else {
         $soap = new Zend_Soap_Server($this->_getWsdl($action));
         $soap->setClass($class)->handle();
     }
 }
开发者ID:heiglandreas,项目名称:ShortURL,代码行数:20,代码来源:SoapController.php

示例10: 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

示例11: postDispatch

 /**
  * Método executado após qualquer action.
  * Responsável por instanciar a classe de soap correta e configurala
  * disponibilizando assim o serviço para ser consumido.
  */
 public function postDispatch()
 {
     $request = $this->getRequest();
     $params = $request->getParams();
     $router = Zend_Controller_Front::getInstance()->getRouter();
     if ($this->_hasParam('wsdl')) {
         $server = new Zend_Soap_AutoDiscover();
     } else {
         $server = new Zend_Soap_Server();
         $url = "{$request->getScheme()}://{$request->getHttpHost()}{$router->assemble($params)}";
         $server->setUri($url);
         $server->setEncoding('ISO-8859-1');
     }
     $server->setClass($this->serviceClass);
     $server->handle();
 }
开发者ID:hackultura,项目名称:novosalic,代码行数:21,代码来源:ServicoController.php

示例12: connectorAction

 public function connectorAction()
 {
     $this->getHelper('viewRenderer')->setNoRender();
     $this->_helper->layout->disableLayout();
     $conf = Zend_Registry::get('config');
     if (isset($_GET['wsdl'])) {
         $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence');
         $autodiscover->setClass('Logic_RemoteSiteConn');
         $this->getResponse()->setHeader('Content-Type', 'text/xml')->setBody($autodiscover->handle());
     } else {
         // pointing to the current file here
         $soap = new Zend_Soap_Server($conf['crossover']['webservice']['wsdl']);
         $soap->setClass('Logic_RemoteSiteConn');
         $soap->setSoapVersion(SOAP_1_2);
         $soap->handle();
     }
 }
开发者ID:knatorski,项目名称:SMS,代码行数:17,代码来源:RemoteappController.php

示例13: soapServerAction

 public function soapServerAction()
 {
     // disable layout and view
     $this->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     // handle wsdl request
     if (isset($_GET['wsdl'])) {
         $autodiscover = new Zend_Soap_AutoDiscover();
         $autodiscover->setClass('MyProject_Service_Soap_Example');
         $autodiscover->handle();
         // handle server request
     } else {
         $serverUrl = str_replace('server', 'wsdl', MAIN_URL . $this->getRequest()->getRequestUri());
         $soap = new Zend_Soap_Server($serverUrl);
         $soap->setClass('MyProject_Service_Soap_Example');
         $soap->handle();
     }
 }
开发者ID:erider,项目名称:basezf,代码行数:18,代码来源:ServiceController.php

示例14: endpointAction

 public function endpointAction()
 {
     // disable wsdl cache
     if (PIMCORE_DEVMODE) {
         ini_set("soap.wsdl_cache_enabled", "0");
     }
     // create classmappings
     $classMap = Webservice_Tool::createClassMappings();
     //        p_r($classMap); die();
     // create wsdl
     // @TODO create a cache here
     $strategy = new Zend_Soap_Wsdl_Strategy_Composite(array("object[]" => "Zend_Soap_Wsdl_Strategy_AnyType"), "Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex");
     $autodiscover = new Zend_Soap_AutoDiscover($strategy);
     $autodiscover->setClass('Webservice_Service');
     $wsdl = $autodiscover->toXml();
     //TODO: do we really want to normalize class names since we had to introduce request and response objects anyway?
     $wsdl = str_replace("Webservice_Data_", "", $wsdl);
     // normalize classnames
     $wsdlFile = PIMCORE_SYSTEM_TEMP_DIRECTORY . "/wsdl.xml";
     file_put_contents($wsdlFile, $wsdl);
     chmod($wsdlFile, 0766);
     // let's go
     if (isset($_GET["wsdl"])) {
         header("Content-Type: text/xml; charset=utf8");
         echo $wsdl;
     } else {
         Pimcore::setAdminMode();
         Document::setHideUnpublished(false);
         Object_Abstract::setHideUnpublished(false);
         Object_Abstract::setGetInheritedValues(false);
         try {
             $server = new Zend_Soap_Server($wsdlFile, array("cache_wsdl" => false, "soap_version" => SOAP_1_2, "classmap" => $classMap));
             $server->registerFaultException("Exception");
             $server->setClass("Webservice_Service");
             $server->handle();
         } catch (Exception $e) {
             Logger::log("Soap request failed");
             Logger::log($e);
             throw $e;
         }
     }
     exit;
 }
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:43,代码来源:SoapController.php

示例15: soapAction

 public function soapAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout()->disableLayout();
     $params = $this->getRequest()->getParams();
     $service = 'ZendT_Mail_Service';
     $this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8', true);
     if (isset($params['wsdl'])) {
         $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
         $autodiscover->setUri(ZendT_Url::getUri());
         $autodiscover->setClass($service);
         $autodiscover->handle();
     } else {
         $server = new Zend_Soap_Server();
         #$wsdl = ZendT_Url::getUri() . "?wsdl";
         $wsdl = APPLICATION_PATH . '/controllers/Mail_v1.wsdl';
         $server->setWsdl($wsdl);
         $server->setClass($service);
         $server->handle();
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:21,代码来源:MailController.php


注:本文中的Zend_Soap_Server类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。