本文整理汇总了PHP中SoapClient::__call方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::__call方法的具体用法?PHP SoapClient::__call怎么用?PHP SoapClient::__call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapClient
的用法示例。
在下文中一共展示了SoapClient::__call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getClient
protected function getClient()
{
if (!$this->client) {
$this->client = new \SoapClient(null, ['location' => 'https://soap.subreg.cz/cmd.php', 'uri' => 'https://soap.subreg.cz/soap']);
$res = $this->client->__call('Login', ['data' => ['login' => $this->login, 'password' => $this->password]]);
if ($res['status'] != 'ok') {
throw new IOException('Subreg: ' . $res['error']['errormsg']);
}
$this->key = $res['data']['ssid'];
}
return $this->client;
}
示例2: __call
public function __call($function_name, $arguments)
{
$result = parent::__call($function_name, $arguments);
$log = new jLogSoapMessage($function_name, $this, 'soap');
jLog::log($log, 'soap');
return $result;
}
示例3: __call
public function __call($method, $arguments)
{
try {
return parent::__call($method, $arguments);
} catch (\SoapFault $e) {
throw new ConnectionException("Problem with connecting BIG Register", 0, $e);
}
}
示例4: sprintf
function __call($function_name, $arguments)
{
$result = parent::__call($function_name, $arguments);
if ($result instanceof SoapFault) {
$result->faultstring = sprintf(_("AWS error [{$this->location}]: %s"), $result->faultstring);
}
return $result;
}
示例5: call
/**
* @param string $action
* @param array $params
* @return mixed
* @throws \SoapFault
*/
private function call($action, $params)
{
$osticketClient = new \SoapClient($this->getWsdlUrl());
try {
$result = $osticketClient->__call($action, $params);
return $result;
} catch (\SoapFault $e) {
throw $e;
}
}
示例6: __call
public function __call($name, $args)
{
// buckaroo requires all numbers to have period notation, otherwise
// an internal error will occur on the server.
$locale = setlocale(LC_NUMERIC, '0');
setlocale(LC_NUMERIC, array('en_US', 'en_US.UTF-8'));
$ret = parent::__call($name, $args);
setlocale(LC_NUMERIC, $locale);
return $ret;
}
示例7: callWebService
public function callWebService($xmlStr, $businessType)
{
//header("content-type:text/html;charset=utf-8");
try {
$checkReceived = new CheckReceived($xmlStr, $businessType, "1");
$param = array("checkReceived" => $checkReceived);
$client = new SoapClient($this->jkf['web_service_url'], array('encoding' => 'UTF-8'));
$result = $client->__call("checkReceived", $param);
$strXML = (string) $result->return;
$retXML = simplexml_load_string($strXML);
$this->insertResult($retXML, "0");
} catch (SOAPFault $e) {
print $e;
}
}
示例8: __call
public function __call($method, $arguments)
{
if (empty($arguments)) {
$arguments[] = array('apiKey' => $this->apiKey);
} else {
$arguments[0] = array_merge(array('apiKey' => $this->apiKey), $arguments[0]);
}
$result = NULL;
try {
$result = parent::__call($method, $arguments);
} catch (Exception $e) {
drupal_set_message(t('Failed to access CBIS: @message', array('@message' => $e->getMessage())));
}
return $result;
}
示例9: __call
public function __call($function_name, $arguments)
{
$timeExecutionBegin = $this->_microtimeFloat();
$ex = false;
try {
$result = parent::__call($function_name, $arguments);
} catch (Exception $e) {
$ex = $e;
}
$timeExecutionEnd = $this->_microtimeFloat();
$log = new jLogSoapMessage($function_name, $this, 'soap', $timeExecutionEnd - $timeExecutionBegin);
jLog::log($log, 'soap');
if ($ex) {
throw $ex;
}
return $result;
}
示例10: __call
/**
* Overides the call method, to keep making
* requests if it times out.
*
* @todo require a better way than using exceptions.
*
* @access public
* @param string $function_name
* @param mixed $arguments
* @return SoapClient
* @throws \SoapFault
*/
public function __call($function_name, $arguments)
{
$result = false;
$max_retries = 5;
$retry_count = 0;
// Keep making the same request until you have reached 5 attempts.
while (!$result && $retry_count < $max_retries) {
try {
$result = parent::__call($function_name, $arguments);
} catch (SoapFault $fault) {
sleep(1);
$retry_count++;
}
}
// Throw the error after 5 attempts
if ($retry_count == $max_retries) {
throw new \SoapFault('Failed after 5 attempts');
}
return $result;
}
示例11: __call
public function __call($function_name, $arguments)
{
$result = false;
$max_retries = 5;
$retry_count = 0;
while (!$result && $retry_count < $max_retries) {
try {
$result = parent::__call($function_name, $arguments);
} catch (SoapFault $fault) {
if ($fault->faultstring != 'Could not connect to host') {
throw $fault;
}
}
sleep(1);
$retry_count++;
}
if ($retry_count == $max_retries) {
throw new SoapFault('Could not connect to host after 5 attempts');
}
return $result;
}
示例12: checkStatus
function checkStatus($file)
{
global $urlPath;
$xml = simplexml_load_file($file);
$lastupdate = explode(" / ", $xml->lastUpdate);
$lastDate = explode(".", $lastupdate[1]);
$lastTime = explode(":", $lastupdate[0]);
$lastDateTime = mktime($lastTime[0], $lastTime[1], $lastTime[2], $lastDate[1], $lastDate[0], $lastDate[2]);
$currentDateTime = mktime();
// if we more thant 30 minutes, we guess that the system si down
if ($currentDateTime - $lastDateTime > 600) {
// Send a alarms
$soapClient = new SoapClient("http://{$_SERVER['SERVER_NAME']}/{$urlPath}index.php?soap=notification.wsdl&password={$soapPassword}&username={$soapUsername}");
$error = 0;
try {
$param = array('param' => array(array('key' => 'type', 'value' => 'ALARM'), array('key' => 'code', 'value' => '900'), array('key' => 'object', 'value' => '0')));
$info = $soapClient->__call("sendMail", $param);
} catch (SoapFault $fault) {
$error = 1;
print "\n alert('Sorry, blah returned the following ERROR: " . $fault->faultcode . "-" . $fault->faultstring . ". We will now take you back to our home page.');\n window.location = 'main.php';\n ";
}
}
}
示例13: __call
public function __call($method, $params)
{
Mage::log("_call");
//Mage::log($method);
//Mage::log($params);
//die;
foreach ($params as $k => $v) {
Mage::log("-------------------------afasdfagfagfr------------------------");
Mage::Log("k is : {$k}");
$data = $this->generateValidXmlFromObj($v);
Mage::Log($data);
// if(is_object($v))
// Mage::Log("v is object ".print_r($v,true));
// else
// Mage::Log("v is string ".$v);
if ($v === null) {
Mage::Log("SPOTTED A NULL YO!!!");
$this->mustParseNulls = true;
$params[$k] = self::_NULL_;
}
}
//die;
return parent::__call($method, $data);
}
示例14: _get_remote_ppt2lp_files
/**
* Get images files from remote host (with webservices)
* @param array current ppt file
* @return array images files
*/
private function _get_remote_ppt2lp_files($file)
{
// host
$ppt2lp_host = api_get_setting('ppt_to_lp.host');
// secret key
$secret_key = sha1(api_get_setting('ppt_to_lp.ftp_password'));
// client
$options = array('location' => $ppt2lp_host, 'uri' => $ppt2lp_host, 'trace' => 1, 'exception' => 1, 'cache_wsdl' => WSDL_CACHE_NONE);
$client = new SoapClient(null, $options);
$result = '';
$file_data = base64_encode(file_get_contents($file['tmp_name']));
$file_name = $file['name'];
$service_ppt2lp_size = api_get_setting('ppt_to_lp.size');
$params = array('secret_key' => $secret_key, 'file_data' => $file_data, 'file_name' => $file_name, 'service_ppt2lp_size' => $service_ppt2lp_size);
$result = $client->__call('wsConvertPpt', array('pptData' => $params));
return $result;
}
示例15: __call
/**
* {@inheritdoc}
* @see SoapClient::__call()
*/
public function __call($function_name, $arguments)
{
return parent::__call($function_name, $arguments);
}