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


PHP SoapClient::__call方法代码示例

本文整理汇总了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;
 }
开发者ID:soukicz,项目名称:subreg-api,代码行数:12,代码来源:Client.php

示例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;
 }
开发者ID:hadrienl,项目名称:jelix,代码行数:7,代码来源:jSoapClient.class.php

示例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);
     }
 }
开发者ID:waarneembemiddeling,项目名称:bigregister-soap,代码行数:8,代码来源:Client.php

示例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;
 }
开发者ID:rakesh-mohanta,项目名称:scalr,代码行数:8,代码来源:class.WSSESoapClient.php

示例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;
     }
 }
开发者ID:iszelei,项目名称:osticket-sdk,代码行数:16,代码来源:Reader.php

示例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;
 }
开发者ID:martinbroos,项目名称:buckaroo,代码行数:10,代码来源:SoapClientWSSEC.php

示例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;
     }
 }
开发者ID:sammychan1981,项目名称:quanpin,代码行数:15,代码来源:GatewayModel.php

示例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;
 }
开发者ID:hugowetterberg,项目名称:cbisimport,代码行数:15,代码来源:CbisClient.php

示例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;
 }
开发者ID:medali1990,项目名称:medsite,代码行数:17,代码来源:jSoapClient.class.php

示例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;
 }
开发者ID:atanenl,项目名称:twinfield,代码行数:32,代码来源:SoapClient.php

示例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;
 }
开发者ID:rafaelfranco,项目名称:SimplePHP,代码行数:21,代码来源:soap.php

示例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            ";
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:23,代码来源:cron.saas.status.php

示例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);
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:24,代码来源:Gorilla_Greatplains_Model_XSoapClient.php

示例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;
 }
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:22,代码来源:openoffice_document.class.php

示例15: __call

 /**
  * {@inheritdoc}
  * @see SoapClient::__call()
  */
 public function __call($function_name, $arguments)
 {
     return parent::__call($function_name, $arguments);
 }
开发者ID:mheydt,项目名称:scalr,代码行数:8,代码来源:SoapClient.php


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