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


PHP SoapClient::__soapCall方法代码示例

本文整理汇总了PHP中SoapClient::__soapCall方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::__soapCall方法的具体用法?PHP SoapClient::__soapCall怎么用?PHP SoapClient::__soapCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SoapClient的用法示例。


在下文中一共展示了SoapClient::__soapCall方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: soapCall

 private function soapCall($function, $input)
 {
     $result = $this->soapClient->__soapCall($function, [$input], null, $this->securityHeader);
     if (!@$result->Resultaat->Succesvol) {
         throw new ClientException(@$result->Resultaat->Omschrijving ?: 'An unknown error occurred');
     }
     return $result;
 }
开发者ID:deft,项目名称:elena-php,代码行数:8,代码来源:Client.php

示例2: calculoAportacionCiudadano

/**
 *
 * @param array $param
 *        	<br>Parámetros de entrada.
 * @return array
 */
function calculoAportacionCiudadano($param)
{
    global $respError, $farmacia;
    $param = objectToArray($param);
    //die(print_r($param));
    if ($farmacia == FARMACIA_DEBUG or strlen(FARMACIA_DEBUG) == 0) {
        if (DEBUG & DEBUG_LOG) {
            $mensaje = print_r($param, TRUE);
            $mensaje .= "--Llamada hecha en el fichero: " . __FILE__ . ", en la línea: " . __LINE__;
            error_log("[" . date("c") . "] \r\n {$mensaje}", 3, DIRECTORIO_LOG . __FUNCTION__ . "_" . date("YmdH") . ".log");
        }
    }
    unset($param["farmacia"]);
    unset($param["DNI"]);
    $client = new SoapClient(END_POINT, array("location" => LOCATION, "trace" => true, "exceptions" => false));
    $result = $client->__soapCall(__FUNCTION__, array($param));
    //die(print_r($result));
    if (is_soap_fault($result)) {
        if ($farmacia == FARMACIA_DEBUG or strlen(FARMACIA_DEBUG) == 0) {
            if (DEBUG & DEBUG_LOG) {
                $mensaje = "REQUEST:\n" . $client->__getLastRequest() . "\n";
                $mensaje .= "RESPONSE:\n" . $client->__getLastResponse() . "\n";
                $mensaje .= "RESULT:\n" . $result . "\n";
                $mensaje .= "--SOAP FAULT, llamada hecha en el fichero: " . __FILE__ . ", en la línea: " . __LINE__ . "\n";
                error_log("[" . date("c") . "] \r\n {$mensaje}", 3, DIRECTORIO_LOG . __FUNCTION__ . "_" . date("YmdH") . ".log");
            }
        }
        return array(__FUNCTION__ . "Result" => array("return" => $result->return, "resultadoOperacion" => array("codigoResultadoOperacion" => -9000, "mensajeResultadoOperacion" => $result->faultstring)));
    }
    return array(__FUNCTION__ . "Result" => array("return" => $result->return, "resultadoOperacion" => $respError->sinErrores()));
}
开发者ID:Veridata,项目名称:SISCATA,代码行数:37,代码来源:calculoAportacionCiudadano.php

示例3: synthesize

 /**
  * Function synthesizing a text 
  * Returned variable is an url of the file
  *
  * @param string $text UTF-8 encoded string to synthesize 
  * @return string URL address for speech file synthesized from $text parameter, or false in case of error
  */
 public function synthesize($text, $text_type)
 {
     error_log("Synthesizing Test: " . $text);
     // the configuration (could be moved to constants section of the website)
     // wsdl URL
     $wsdl = 'http://www.ivona.com/saasapiwsdl.php';
     // soap client initialization (it requires soap client php extension available)
     $Binding = new SoapClient($wsdl, array('exceptions' => 0));
     // getToken for the next operation
     $input = array('user' => USER);
     $token = $Binding->__soapCall('getToken', $input);
     if (is_soap_fault($token)) {
         error_log('API call: getToken error: ' . print_r($token, 1));
         return false;
     }
     // additional parameters
     $params = array();
     //$params[]=array('key'=>'Prosody-Rate', 'value'=>PROSODY_RATE); // example value for the new text speed
     // createSpeechFile (store text in IVONA.com system, invoke synthesis and get the link for the file)
     $input = array('token' => $token, 'md5' => md5(md5(PASSWORD) . $token), 'text' => $text, 'contentType' => $text_type, 'voiceId' => SELECTED_VOICE, 'codecId' => 'mp3/22050', 'params' => $params);
     $fileData = $Binding->__soapCall('createSpeechFile', $input);
     if (is_soap_fault($fileData)) {
         error_log('API call: createSpeechFile error: ' . print_r($fileData, 1));
         return false;
     }
     // return the sound file url
     return $fileData['soundUrl'];
 }
开发者ID:mes01,项目名称:WEB3_S13,代码行数:35,代码来源:ivonaAPIClient_1and2.php

示例4: posteazaAnunt

function posteazaAnunt($inchiriere = 0)
{
    global $oferta;
    global $apartament;
    global $client;
    global $agent;
    global $subzona;
    global $fotografii;
    $id = $oferta->id;
    if ($inchiriere) {
        $id += 90000;
    }
    $ofertaxml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
	<oferta tip="apartament" versiune="2">
	<id2>' . $id . '</id2>
	<adresa>' . '' . '</adresa>
	<longitudine>' . $apartament->Lng . '</longitudine>
	<latitudine>' . $apartament->Lat . '</latitudine>
	<altitudine>200</altitudine>
	
	
	</oferta>';
    $s = new SoapClient(API_URI);
    // login
    echo "Login<br/>";
    try {
        $result = $s->__soapCall('login', array('login' => array('id' => 'X36V', 'hid' => '89cn23489fn32r', 'server' => '', 'agent' => '', 'parola' => '')));
    } catch (Exception $e) {
        die('Eroare Login: ' . $e->getMessage());
    }
    $extra = explode('#', $result->extra);
    // id-ul de sesiune va fi folosit ulterior la orice request
    $session_id = $extra[1];
    echo '<pre>LOGIN: ' . print_r($result, true) . '</pre>';
    // publica oferta
    echo "Publica<br/>";
    if ($oferta->ExportImobiliare < 3 && $oferta->Stare == 'de actualitate') {
        if ($oferta->ExportImobiliare = 1) {
            $operatie = "MOD";
        } else {
            $operatie = "ADD";
        }
    } else {
        $operatie = "DEL";
    }
    try {
        $result = $s->__soapCall('publica_oferta', array('publica_oferta' => array('id_str' => '0:' . $id2random, 'sid' => $session_id, 'operatie' => $operatie, 'ofertaxml' => $ofertaxml)));
    } catch (Exception $e) {
        die('Eroare Publicare oferta: ' . $e->getMessage());
    }
    echo '<pre>PUBLICARE OFERTA: ' . print_r($result, true) . '</pre>';
    // logout
    try {
        $result = $s->__soapCall('logout', array('logout' => array('sid' => $session_id, 'id' => '', 'jurnal' => '')));
    } catch (Exception $e) {
        die('Eroare Logout: ' . $e->getMessage());
    }
    echo '<pre>LOGOUT: ' . print_r($result, true) . '</pre>';
}
开发者ID:hionuth,项目名称:Imob2009,代码行数:59,代码来源:soapclient.php

示例5: call

 /**
  * @param string $method
  * @param mixed $data
  * @param array $options
  * @param null $inputHeaders
  * @param null $outputHeaders
  *
  * @throws Exception\ClientException
  * @return mixed
  */
 public function call($method, $data, $options = array(), $inputHeaders = null, &$outputHeaders = null)
 {
     if (!$this->client) {
         $this->initializeClient();
     }
     try {
         return $this->client->__soapCall($method, $data, $options, $inputHeaders, $outputHeaders);
     } catch (\SoapFault $soapFault) {
         throw new ClientException(sprintf('Call to %s failed', $method), 0, $soapFault);
     }
 }
开发者ID:jeremylivingston,项目名称:exfoliate,代码行数:21,代码来源:SoapClient.php

示例6: execute

 /**
  * Execute the requested call
  * 
  * @param   string $service     The name of the service to execute
  * @param   array  $parameters  All parameter in an assiociative array
  * @return  type
  * @throws  Exception
  */
 public function execute($service, $parameters)
 {
     // make sure a SOAP client exists
     if (is_null($this->soapClient)) {
         $this->createSoapClient();
     }
     // create a request object (an stdClass) from the parameters array
     $request = (object) $parameters;
     // add authentication to the request object
     $request->header = $this->getRequestHeader();
     // execute the call
     $response = $this->soapClient->__soapCall($service, array($request));
     // return the response
     return $response;
 }
开发者ID:infoweb-internet-solutions,项目名称:yii2-flexmail,代码行数:23,代码来源:Flexmail.php

示例7: call

 /**
  * method to call didww api 2 soap method
  * @param string $method
  * @param array $arguments
  * @return mixed
  * @throws ApiClientException
  */
 public function call($method, $arguments = array())
 {
     $arguments = array_merge(array('auth_string' => self::getCredentials()->getAuthString()), $arguments);
     $method = 'didww_' . $method;
     $timeStart = microtime(true);
     try {
         $result = $this->_client->__soapCall($method, $arguments);
     } catch (\Exception $e) {
         if (self::$_debug) {
             $this->debug("raw request", $this->_client->__getLastRequest());
             $this->debug("raw response", $this->_client->__getLastResponse());
         }
         throw $e;
     }
     if (self::$_debug) {
         $this->debug("raw request", $this->_client->__getLastRequest());
         $this->debug("raw response", $this->_client->__getLastResponse());
     }
     /**
      * check if api returned error and throw exception
      */
     if (isset($result->error) && $result->error > 0) {
         $message = isset(self::$_errorCodes[$result->error]) ? self::$_errorCodes[$result->error] : 'Unknown error with code : ' . $result->error;
         throw new ApiClientException($message);
     }
     $timeFinish = microtime(true);
     $this->time = $timeFinish - $timeStart;
     if (self::$_debug) {
         $this->debug("response from {$method}:", $result);
     }
     return (array) $result;
 }
开发者ID:didww,项目名称:php-sdk,代码行数:39,代码来源:ApiClient.php

示例8: query

 /**
  * Query the SOAP server with the given method and parameters
  *
  * @return mixed Returns the result on success, false on failure
  */
 public function query()
 {
     $this->error = false;
     if (!$this->connected) {
         return false;
     }
     $args = func_get_args();
     $method = null;
     $queryData = null;
     if (count($args) === 2) {
         $method = $args[0];
         $queryData = $args[1];
     } elseif (count($args) > 2 && !empty($args[1])) {
         $method = $args[0];
         $queryData = $args[1][0];
     } else {
         return false;
     }
     try {
         $result = $this->client->__soapCall($method, $queryData);
     } catch (SoapFault $fault) {
         $this->error = $fault->faultstring;
         $this->showError();
         return false;
     }
     return $result;
 }
开发者ID:cahs,项目名称:datasources,代码行数:32,代码来源:SoapSource.php

示例9: _doCharge

 protected function _doCharge()
 {
     $data = array('merchantCode' => trim($this->user_api), 'cardcode' => $this->Encrypt($this->pass_api, $this->pin), 'cardserial' => trim($this->seri), 'cardtype' => $this->_array_card[$this->card_type], 'target' => $this->user["ch_public_id"], "signkey" => $this->Encrypt($this->pass_api, $this->_array_card[$this->card_type] . $this->pin . $this->user_api . $this->pass_api));
     $soap_client = new \SoapClient(null, array('location' => "http://172.16.10.10/ver2.0/?r=cardcharging&ws=1", 'uri' => "localhost", 'connection_timeout' => 120, 'encoding' => 'utf-8', 'trace' => 1, 'exceptions' => 0));
     $result = $soap_client->__soapCall("CardChargingController.UseCard", array("cardrequest" => json_encode($data)));
     //        if ($this->user["ch_public_id"] == "f23741423013342")
     //        {
     //            print_r($result);
     //            die;
     //        }
     $result = json_decode($result);
     if (!empty($result)) {
         $this->msg = $result->retMsg;
         $this->info_card = $result->data_cardValue;
     } else {
         $this->msg = "Hệ Thống Đang Bận Vui Lòng thử lại sau vài giây bạn nhé !!!";
         $this->info_card = 0;
     }
     if (!empty($result->data_transId)) {
         $this->transaction = $result->data_transId;
     }
     if (intval($this->info_card) >= 10000) {
         $response = array("status" => 1, "message" => "Bạn đã nạp : " . $this->info_card . " VNĐ. Vào tài khoản : " . $this->user["ch_nickname"], "partner_transaction" => $this->transaction, "value" => $this->info_card, "promotion" => $this->_promotion[$this->card_type]);
     } else {
         $response = array("status" => 0, "message" => $this->msg, "partner_transaction" => $this->transaction, "value" => 0, "promotion" => 0);
     }
     return $response;
 }
开发者ID:nbtai,项目名称:haiquan,代码行数:28,代码来源:vielink.php

示例10: __soapCall

 public function __soapCall($function_name, $arguments, $options = null, $input_headers = null, &$output_headers = null)
 {
     $started = microtime(true);
     $this->_data = array_merge($this->_data, ['function_name' => $function_name, 'arguments' => $arguments, 'function_options' => $options, 'input_headers' => $input_headers, 'start_time' => date('Y-m-d H:i:s')]);
     try {
         $result = parent::__soapCall($function_name, $arguments, $options, $input_headers, $output_headers);
         $this->_data['duration'] = microtime(true) - $started;
         if ($output_headers) {
             $this->_data['output_headers'] = (array) $output_headers;
         }
         if (is_soap_fault($result)) {
             // Cover non-exception variant
             return $this->logSoapFault($result);
         }
         $this->_data['result_object'] = $result;
         $this->finalize();
         return $result;
     } catch (\Exception $error) {
         $this->_data['duration'] = microtime(true) - $started;
         if ($output_headers) {
             $this->_data['output_headers'] = (array) $output_headers;
         }
         $this->logSoapFault($error);
         throw $error;
     }
 }
开发者ID:SaschaScholly,项目名称:yii2-audit,代码行数:26,代码来源:SoapClient.php

示例11: testEnv

 private function testEnv(array $functions, $url, OutputInterface $output)
 {
     $soapClient = new \SoapClient($url, array('cache_wsdl' => 0, 'trace' => 1, 'soap_version' => SOAP_1_1));
     foreach ($functions as $function => $parameters) {
         $output->writeln('Test de la fonction soap <comment>' . $function . '</comment>');
         $output->writeln('Parameters : ');
         dump($parameters);
         if (!array_key_exists('methodCall', $this->config) || $this->config['methodCall'] == 'soapCall') {
             $result = $soapClient->__soapCall($function, $parameters);
         } else {
             $result = $soapClient->{$function}($parameters);
         }
         $headers = $soapClient->__getLastResponseHeaders();
         if ($output->isDebug()) {
             $output->writeln('Entete de la reponse : ');
             dump($headers);
         }
         if (false === ($site = $this->getSiteHeader($headers))) {
             throw new \Exception('Site Header introuvable dans la réponse.', 1);
         }
         $output->writeln('Serveur ayant repondu : <info>' . $site . '</info>');
         $output->writeln('Reponse : ');
         dump($result);
         if ($output->isDebug()) {
             dump($soapClient->__getLastResponse());
         }
     }
 }
开发者ID:macintoshplus,项目名称:TestWebService,代码行数:28,代码来源:WsSoap.php

示例12: callPhpSOAP

 /**
  * Call php soap
  *
  * @param	unknown_type		$func
  * @param	unknown_type		$param
  * @return	unknown
  */
 function callPhpSOAP($func, $param)
 {
     $header = null;
     if ($this->options['authentication'] == 'headers') {
         if ($this->reactid) {
             $header = new SoapHeader('', 'HeaderAuthenticate', (object) array('reactid' => $this->reactid), 1);
         } elseif ($this->username && $this->password) {
             $header = new SoapHeader('', 'HeaderLogin', (object) array('username' => $this->username, 'password' => $this->password), 1);
             $this->password = false;
         }
     }
     /*return array(
     			'username' => $this->username,
     			'password' => $this->password,
      		'func' => $func
     		); */
     $result = $this->client->__soapCall($func, $param, NULL, $header);
     if (is_soap_fault($result)) {
         $this->error = $result;
         return false;
     }
     if (is_a($this->client->headersIn['HeaderAuthenticate'], 'stdClass')) {
         $this->reactid = $this->client->headersIn['HeaderAuthenticate']->reactid;
     }
     return $this->options['format'] == 'object' ? $result : $this->object2array($result);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:33,代码来源:class.tx_em_connection_soap.php

示例13: __soapCall

 public function __soapCall($function_name, $arguments, $options = array(), $input_headers = null, &$output_headers = null)
 {
     $result = parent::__soapCall($function_name, $arguments, $options, $input_headers, $output_headers);
     $log = new jLogSoapMessage($function_name, $this, 'soap');
     jLog::log($log, 'soap');
     return $result;
 }
开发者ID:hadrienl,项目名称:jelix,代码行数:7,代码来源:jSoapClient.class.php

示例14: sendTaskMsg

 public function sendTaskMsg($projectID = 0, $taskID = 0, $oldAssignedTo = null, $isFromCreate)
 {
     #return;
     if ($isFromCreate) {
         $assignedTo = current($_POST['assignedTo']);
     } else {
         $assignedTo = $_POST['assignedTo'];
     }
     $realname = $this->dao->select('realname')->from(TABLE_USER)->where('account')->eq($assignedTo)->fetch('realname');
     $msg = "{$realname},您被指派了任务,信息链接:   " . 'http://' . $_SERVER['HTTP_HOST'] . '/zentao/sprint-taskview-' . "{$taskID}.html";
     $fastMsg = $this->dao->select('fastMsg')->from(TABLE_USER)->where('account')->eq($assignedTo)->fetch('fastMsg');
     try {
         $client = new SoapClient("http://99.48.237.125:5880/openapi/openapi.php?wsdl");
         $parm1 = '5DEDD10D2E434A139A05953BDB66CC68';
         $parm2 = '600000';
         $parm3 = $fastMsg;
         $parm4 = $msg;
         $param = array('key' => $parm1, 'from' => $parm2, 'sendto' => $parm3, 'content' => $parm4);
         if ($oldAssignedTo != $assignedTo) {
             $arr = $client->__soapCall('SendMessage', $param);
         }
     } catch (SOAPFault $e) {
         print $e;
     }
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:25,代码来源:model.php

示例15: receiveResponseXML

 public function receiveResponseXML($ticket, $response, $hresult, $message)
 {
     $req = new QuickBooks_Request_ReceiveResponseXML($ticket, $response, $hresult, $message);
     $resp = parent::__soapCall('receiveResponseXML', array($req));
     $tmp = current($resp);
     return $tmp;
 }
开发者ID:djeraseit,项目名称:quickbooks-php,代码行数:7,代码来源:Php.php


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