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


PHP Zend_Soap_Client::__call方法代碼示例

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


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

示例1: __call

 public function __call($name, $arguments)
 {
     $b = Kwf_Benchmark::start('soapCall', $name);
     $ret = parent::__call($name, $arguments);
     if ($b) {
         $b->stop();
     }
     return $ret;
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:9,代碼來源:Client.php

示例2: __call

 /**
  * Perform a SOAP call
  *
  * @param string $name
  * @param array  $arguments
  * @return mixed
  */
 public function __call($name, $arguments)
 {
     /*$config = Zend_Registry::get('config');
             
             $db = Zend_Db_Table::getDefaultAdapter();
             $cm = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('soaplogger');
     
             $write = new Zend_Log_Writer_Db($db, 'log.soap', $cm->getColumnMapping());
             $cm->setWriter($write);
     
             $logger = $cm->getLogObject();*/
     //$logger->setEventItem('method', $name);
     //$logger->setEventItem('params', serialize($arguments));
     $soapInfo = array();
     try {
         $result = parent::__call($name, $arguments);
         $soapInfo[] = '';
         $soapInfo[] = $this->getLastMethod();
         $soapInfo[] = $this->getLastRequestHeaders();
         $soapInfo[] = $this->getLastResponseHeaders();
         $soapInfo[] = $this->getLastRequest();
         $soapInfo[] = $this->getLastResponse();
         $soapInfoStr = implode("[zfdebug]", $soapInfo);
         $this->saveSoapDataInToFile($soapInfoStr);
         //$logger->setEventItem('result', json_encode($result));
         /*if($config['webservice']['logxml']) {
               $logger->setEventItem('request', json_encode($this->getLastRequest()));
               $logger->setEventItem('response', json_encode($this->getLastResponse()));
           }*/
         //$logger->log('Wykonano akcję '.$name,Zend_Log::INFO);
         return $result;
     } catch (Exception $e) {
         $soapInfo[] = '';
         $soapInfo[] = $e->getMessage();
         $soapInfoStr = implode("[zfdebug]", $soapInfo);
         $this->saveSoapDataInToFile($soapInfoStr);
         //$logger->setEventItem('result', $e->getMessage());
         /*if($config['webservice']['logxml']) {
               $logger->setEventItem('request', json_encode($this->getLastRequest()));
               $logger->setEventItem('response', json_encode($this->getLastResponse()));
           }*/
         //$logger->log('Wyjątek w akcji '.$name,Zend_Log::ERR);
         throw $e;
     }
 }
開發者ID:knatorski,項目名稱:SMS,代碼行數:52,代碼來源:Client.php

示例3: __call

 /**
  * Perform a SOAP call but first check for adding STS Token or fetch one
  *
  * @param string $name
  * @param array  $arguments
  * @return mixed
  */
 public function __call($name, $arguments)
 {
     /**
      * add WSSE Security header
      */
     if ($this->_tokenService !== null) {
         // if login method we addWsseLoginHeader
         if (in_array('login', $arguments)) {
             $this->addWsseLoginHeader();
         } elseif ($name == 'getTokens') {
             $this->addWsseTokenHeader($this->_tokenService->getLoginToken());
         } else {
             $this->addWsseSecurityTokenHeader($this->_tokenService->getTokens());
         }
     }
     return parent::__call($name, $arguments);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:24,代碼來源:Soap.php

示例4: simpletest

 /**
  * Execute test client WS request
  *
  * @param string $serverurl server url (including token parameter or username/password parameters)
  * @param string $function function name
  * @param array $params parameters of the called function
  * @return mixed
  */
 public function simpletest($serverurl, $function, $params)
 {
     //zend expects 0 based array with numeric indexes
     $params = array_values($params);
     require_once 'Zend/Soap/Client.php';
     $client = new Zend_Soap_Client($serverurl . '&wsdl=1');
     return $client->__call($function, $params);
 }
開發者ID:alanaipe2015,項目名稱:moodle,代碼行數:16,代碼來源:locallib.php

示例5: sendSoapRequest

 /**
  * implements and performs the general soap request to Trusted Shops
  *
  * @param string $soapFunction
  * @param array $soapData
  * @param $shopId
  * @internal param $requestURLSuffix
  * @return string or int | soap resonse data
  */
 private function sendSoapRequest($soapFunction, array $soapData = null, $shopId)
 {
     define('SOAP_ERROR', -1);
     $settings = $this->tsConfig->getSettings($shopId);
     $ts_url = $settings['trustedShopsTestSystem'] ? 'protection-qa.trustedshops.com' : 'protection.trustedshops.com';
     //special url for protection request on save order
     $wsdlUrl = 'https://' . $ts_url . '/ts/protectionservices/ApplicationRequestService?wsdl';
     try {
         $client = new \Zend_Soap_Client($wsdlUrl);
         $returnValue = $client->__call($soapFunction, $soapData);
     } catch (\SoapFault $fault) {
         $returnValue = $fault->faultcode . ' ' . $fault->faultstring;
     }
     return $returnValue;
 }
開發者ID:Goucher,項目名稱:shopware,代碼行數:24,代碼來源:SoapApi.php

示例6: __call

 public function __call($name, $params)
 {
     return json_decode(parent::__call($name, $params), true);
 }
開發者ID:knatorski,項目名稱:SMS,代碼行數:4,代碼來源:Livedocx.php

示例7: sendSoapRequest

	/**
	 * Helper function which implements the general soap request to trusted shops
	 *
	 * @param \String $soapFunction
	 * @param array $soapData
	 * @internal param $requestURLSuffix
	 * @return string or int | soap resonse data
	 */
	private function sendSoapRequest(String $soapFunction, Array $soapData = null)
	{
		define("SOAP_ERROR", -1);

		# TS-ID received by Trusted Shops
		$tsId = $this->pluginConfig->tsEID;
		if(empty($soapData)) {
			$soapData = array($tsId);
		}

		if($soapFunction == "requestForProtectionV2" || $soapFunction == "getRequestState" ) {
			$ts_url = ($this->pluginConfig->testSystemActive) ? self::TS_PROTECTION_QA_SERVER : self::TS_PROTECTION_SERVER;
			//special url for protection request on save order
			$wsdlUrl = "https://" . $ts_url . self::TS_PROTECTION_WSDL;
		}
		elseif ($soapFunction == "updateRatingWidgetState") {
			$ts_url = ($this->pluginConfig->testSystemActive) ? self::TS_QA_SERVER : self::TS_SERVER;
			$wsdlUrl = "https://" . $ts_url . self::TS_RATING_WSDL;
		}
		else {
			$ts_url = ($this->pluginConfig->testSystemActive) ? self::TS_QA_SERVER : self::TS_SERVER;
			$wsdlUrl = "https://" . $ts_url . self::TS_WSDL;
		}
		
		try {
			$client = new Zend_Soap_Client($wsdlUrl);
			$returnValue = $client->__call($soapFunction, $soapData);
		}
		catch(SoapFault $fault) {
			$returnValue = $fault->faultcode . " " . $fault->faultstring;
		}
		return $returnValue;
	}
開發者ID:nhp,項目名稱:shopware-4,代碼行數:41,代碼來源:TrustedShopsDataModel.php


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