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


PHP SoapServer::setClass方法代碼示例

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


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

示例1: callback

 public function callback()
 {
     $s = new SoapServer(DIR_CONFIG . 'ishopclientws.wsdl');
     $s->setClass('qiwiSoap');
     $s->handle();
     exit;
 }
開發者ID:ralfeus,項目名稱:moomi-daeri.com,代碼行數:7,代碼來源:qiwi.php

示例2: soapServer

 public function soapServer($request, $response)
 {/*{{{*/
     $postdata = file_get_contents("php://input");
     $function = 'soapServer';
     $this->ioLogRecorder->addLog(XDateTime::now()->toString()." service [{$function}] ".$this->ioLogRecorder->format2SimpleLog($postdata));
     $configs = ProviderConfigFactory::getProviderAppConfigs(PhoneConference::SPTYPE_HUAWEI, TeleConfProvider::APPTYPE_CONF);
     $callbackUrl = $configs['callbackUrl'];
     $server = new SoapServer(null, array('uri' => 'HuaweiConfCallback','location'=>$callbackUrl));
     $server->setClass('HuaweiTeleConfApi');
     try
     {
         $lockName = $this->getLockerName($postdata);
         $cacher= DAL::get()->getCache(Cacher::CACHETYPE_LOCKER);
         $locker  = LockUtil::factory(LockUtil::LOCK_TYPE_MEMCACHE, array('memcache' => $cacher));
         $locker->getLock($lockName);
         $server->handle();
         $locker->releaseLock($lockName);
     }
     catch(Exception $ex)
     {
         $locker->releaseLock($lockName);
     }
     header("HTTP/1.1 202 Accepted");
     header("Content-Type: text/xml;charset=UTF-8");
     return parent::DIRECT_OUTPUT;
 }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:26,代碼來源:huaweiconfcallbackcontroller.php

示例3: run

 /**
  * Run webservice
  *
  * @param Mage_Api_Controller_Action $controller
  * @return Mage_Api_Model_Server_Adapter_Soap
  */
 public function run()
 {
     $urlModel = Mage::getModel('core/url')->setUseSession(false);
     if ($this->getController()->getRequest()->getParam('wsdl') !== null) {
         // Generating wsdl content from template
         $io = new Varien_Io_File();
         $io->open(array('path' => Mage::getModuleDir('etc', 'Mage_Api')));
         $wsdlContent = $io->read('wsdl.xml');
         $template = Mage::getModel('core/email_template_filter');
         $wsdlConfig = new Varien_Object();
         $queryParams = $this->getController()->getRequest()->getQuery();
         if (isset($queryParams['wsdl'])) {
             unset($queryParams['wsdl']);
         }
         $wsdlConfig->setUrl(htmlspecialchars($urlModel->getUrl('*/*/*', array('_query' => $queryParams))));
         $wsdlConfig->setName('Magento');
         $wsdlConfig->setHandler($this->getHandler());
         $template->setVariables(array('wsdl' => $wsdlConfig));
         $this->getController()->getResponse()->setHeader('Content-Type', 'text/xml')->setBody($template->filter($wsdlContent));
     } elseif ($this->_extensionLoaded()) {
         $this->_soap = new SoapServer($urlModel->getUrl('*/*/*', array('wsdl' => 1)));
         use_soap_error_handler(false);
         $this->_soap->setClass($this->getHandler());
         $this->getController()->getResponse()->setHeader('Content-Type', 'text/xml')->setBody($this->_soap->handle());
     } else {
         $this->fault('0', 'Unable to load Soap extension on the server');
     }
     return $this;
 }
開發者ID:codercv,項目名稱:urbansurprisedev,代碼行數:35,代碼來源:Soap.php

示例4: request

 /**
  * Building query
  *
  * @param array $params Query params
  * @return array/boolean
  */
 public function request()
 {
     $properties = array('classmap' => array('tns:updateBill' => 'qiwiParam', 'tns:updateBillResponse' => 'qiwiResponse'));
     $wsdl = MODX_CORE_PATH . 'components/minishop2/custom/payment/lib/qiwi/IShopClientWS.wsdl';
     $Soap = new SoapServer($wsdl, $properties);
     $Soap->setClass('qiwiServer', $this->config['shopId'], $this->config['shopKey'], $this->config['statusPaid']);
     $Soap->handle();
     return true;
 }
開發者ID:legkomedia,項目名稱:mspQiwi,代碼行數:15,代碼來源:qiwi.class.php

示例5: openinvoiceAction

 public function openinvoiceAction()
 {
     $_mode = $this->_getConfigData('demoMode');
     $wsdl = $_mode == 'Y' ? 'https://ca-test.adyen.com/ca/services/OpenInvoiceDetail?wsdl' : 'https://ca-live.adyen.com/ca/services/OpenInvoiceDetail?wsdl';
     $server = new SoapServer($wsdl);
     $server->setClass(self::OPENINVOICE_SOAP_SERVER);
     $server->addFunction(SOAP_FUNCTIONS_ALL);
     $server->handle();
     exit;
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:10,代碼來源:ProcessController.php

示例6: PanamericanaServer

 public function PanamericanaServer()
 {
     $server = new SoapServer("Oris.wsdl");
     $server->setClass("Metodos");
     try {
         $server->handle();
     } catch (Exception $e) {
         $server->fault('Sender', $e->getMessage());
     }
 }
開發者ID:tsyacom,項目名稱:panamericanaWS_H2H,代碼行數:10,代碼來源:indexController.php

示例7: ws

 public function ws()
 {
     Load::library('WebService');
     $server = new SoapServer(null, array('uri' => 'http://localhost/freekore/test/ws'));
     // Asignamos la Clase
     $server->setClass('WebService');
     // Atendemos las peticiones
     $server->handle();
     $server->getFunctions();
 }
開發者ID:mmendoza000,項目名稱:freekore,代碼行數:10,代碼來源:test.controller.php

示例8: indexAction

 /**
  * Add your definition route and the name route[optional]
  *
  * @Route /service
  * 
  * 
  * @param \Slim\Http\Request $request
  * @param \Slim\Http\Response $response
  * @param \Slim\Route $route
  */
 public function indexAction($request, $response, $route)
 {
     $dirClass = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Soap' . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'service.wsdl';
     if (file_exists($dirClass)) {
         $server = new \SoapServer($dirClass, array('soap_version' => SOAP_1_2));
         $server->setClass('Raptor2\\ServiceBundle\\Soap\\Service');
         $this->app->contentType(\Raptor\Raptor::APPXML);
         $server->handle();
     }
 }
開發者ID:williamamed,項目名稱:Raptor2,代碼行數:20,代碼來源:ServerController.php

示例9: index

 function index()
 {
     $wsdl = $this->getViewer('wsdl')->process($this);
     $wsdlFile = TEMP_FOLDER . '/sapphire-wsdl-' . $this->class;
     $fh = fopen($wsdlFile, 'w');
     fwrite($fh, $wsdl);
     fclose($fh);
     $s = new SoapServer($wsdlFile, array('cache_wsdl' => WSDL_CACHE_NONE));
     $s->setClass($this->class);
     $s->handle();
 }
開發者ID:hamishcampbell,項目名稱:silverstripe-sapphire,代碼行數:11,代碼來源:SapphireSoapServer.php

示例10: handleSoapServer

 /**
  * handle 一個 SoapServer
  *
  * Uses:
  * <code>
  * Watt_Service_Servicer::handleSoapServer( "Your_Class_Servicer", "demo.wsdl" );
  * </code>
  * 
  * @param string $className
  * @param mixed $wsdl
  * @param array $options
  */
 public static function handleSoapServer($className, $wsdl, array $options = array())
 {
     if (!class_exists($className)) {
         Watt::loadClass($className);
     }
     //$server = new SoapServer( null, array('uri' => "http://test-uri/") );
     $server = new SoapServer(Watt_Config::getConfigPath() . "wsdl/" . $wsdl);
     $server->setClass($className);
     $server->handle();
     exit;
 }
開發者ID:uwitec,項目名稱:outbuying,代碼行數:23,代碼來源:Servicer.php

示例11: index

 public function index()
 {
     $host = $_SERVER['HTTP_HOST'];
     $module = MODULE_NAME;
     $action = ACTION_NAME;
     $server = "";
     $wsdl = "";
     $soaparray = array('soap_version' => SOAP_1_2);
     $server = new \SoapServer(file_get_contents(__DIR__ . '/ws/order.wsdl'), $soaparray);
     $server->setClass(get_class($this));
     $server->handle();
 }
開發者ID:hzshark,項目名稱:netdisk,代碼行數:12,代碼來源:WsclientController.class.php

示例12: order

 public function order()
 {
     $host = $_SERVER['HTTP_HOST'];
     $module = MODULE_NAME;
     $action = ACTION_NAME;
     $server = "";
     $wsdl = "";
     $soaparray = array("uri" => "http://10.155.30.170:8880/ws/order.php?wsdl", 'soap_version' => SOAP_1_2);
     $soaparray = array("location" => "http://" . $host . "/" . $module . "/" . $action, "uri" => $action . ".html");
     $server = new \SoapServer(null, $soaparray);
     $server->setClass(get_class($this));
     $server->handle();
 }
開發者ID:hzshark,項目名稱:netdisk,代碼行數:13,代碼來源:WsController.class.php

示例13: homologacaoAction

 /**
  * Executa os métodos no ambiente de homologação do webservice SOAP
  */
 public function homologacaoAction()
 {
     $this->noLayout();
     ini_set('soap.wsdl_cache_enabled', '0');
     $sWsdl = $this->view->baseUrl('/webservice/wsdlValidations/homologacao/modelo1.wsdl');
     $server = new SoapServer($sWsdl, array('soap_version' => SOAP_1_1, 'uri' => $this->view->baseUrl('/webservice/index/homologacao/'), 'trace' => TRUE));
     $server->setClass('WebService_Model_Processar');
     $server->addFunction('RecepcionarLoteRps');
     $server->addFunction('ConsultarSituacaoLoteRps');
     $server->addFunction('ConsultarNfsePorRps');
     $server->addFunction('ConsultarLoteRps');
     $server->addFunction('CancelarNfse');
     $server->addFunction('ConsultarNfse');
     $server->handle();
 }
開發者ID:arendasistemasintegrados,項目名稱:mateusleme,代碼行數:18,代碼來源:IndexController.php

示例14: build

 /**
  * Finally returns a SoapClient instance.
  *
  * @return \BeSimple\SoapServer\SoapServer
  */
 public function build()
 {
     $this->validateOptions();
     use_soap_error_handler($this->errorReporting);
     $server = new SoapServer($this->wsdl, $this->getSoapOptions());
     if (null !== $this->persistence) {
         $server->setPersistence($this->persistence);
     }
     if (null !== $this->handlerClass) {
         $server->setClass($this->handlerClass);
     } elseif (null !== $this->handlerObject) {
         $server->setObject($this->handlerObject);
     }
     return $server;
 }
開發者ID:mablae,項目名稱:BeSimpleSoap,代碼行數:20,代碼來源:SoapServerBuilder.php

示例15: _execute

 /**
  * Execução de Serviço
  *
  * Construção de Serviços para determinados elementos do sistema, utilizando
  * ações nesta controladora para acesso. Esta inicialização deve ser
  * efetuada somente uma vez por requisição.
  *
  * @param  string $element Nome do Serviço para Execução
  * @return null
  */
 protected function _execute($element)
 {
     // Desabilitar Layout
     WSL_Controller_Front::getInstance()->getConfig()->setParam('Layout.enabled', false);
     // Inicialização
     $service = new SoapServer(null, array('uri' => 'tns:' . $element . 'Service'));
     // Configurar Classe
     $service->setClass('Service_' . $element);
     // Tratamento de Requisição
     try {
         $service->handle();
     } catch (Exception $e) {
         // Tratamento de Erro
         $service->fault('Server', $e->getMessage());
     }
 }
開發者ID:laiello,項目名稱:wanderson,代碼行數:26,代碼來源:Services.php


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