本文整理汇总了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;
}
示例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;
}
}
示例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);
}
示例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);
}
示例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;
}
示例6: __call
public function __call($name, $params)
{
return json_decode(parent::__call($name, $params), true);
}
示例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;
}