• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_soap_fault函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_soap_fault函数的典型用法代码示例。如果您正苦于以下问题:PHP is_soap_fault函数的具体用法?PHP is_soap_fault怎么用?PHP is_soap_fault使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: 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


示例2: parse

 public function parse($response)
 {
     if (is_array($response)) {
         $result = array_shift($response);
         $xml = $result->any;
         $matches = array();
         if (preg_match('/<ResultStatus>(?<status>[^\\>]*)<\\/ResultStatus>/', $xml, $matches) != false) {
             $this->resultStatus = $matches['status'];
         }
         if (preg_match('/<ResultMessage>(?<message>[^\\>]*)<\\/ResultMessage>/', $xml, $matches) != false) {
             $this->resultMessage = $matches['message'];
         }
     } elseif (is_string($response)) {
         $matches = array();
         if (preg_match('/<ResultStatus>(?<status>[^\\>]*)<\\/ResultStatus>/', $response, $matches) != false) {
             $this->resultStatus = $matches['status'];
         }
         if (preg_match('/<ResultMessage>(?<message>[^\\>]*)<\\/ResultMessage>/', $response, $matches) != false) {
             $this->resultMessage = $matches['message'];
         }
     } elseif (is_soap_fault($response)) {
         $this->resultStatus = $response->getCode();
         $this->resultMessage = $response->getMessage();
     }
 }
开发者ID:samrap,项目名称:yardi-client,代码行数:25,代码来源:YardiResponse.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: info

 public function info($tag)
 {
     $args = array('guid' => '11111111-1111-1111-1111-111111111111', 'applicationName' => 'GLPI', 'serviceTags' => $tag);
     $response = parent::__soapCall('GetAssetInformation', array($args));
     if (is_soap_fault($response) || !isset($response->GetAssetInformationResult)) {
         return false;
     }
     $ship_time = strtotime($response->GetAssetInformationResult->Asset->AssetHeaderData->SystemShipDate);
     $info['ShipDate'] = date("Y-m-d", $ship_time);
     $warranty_end_date = "";
     $warranty_days_remaining = -1;
     if (isset($response->GetAssetInformationResult->Asset->Entitlements) && isset($response->GetAssetInformationResult->Asset->Entitlements->EntitlementData)) {
         $entitlement_data = $response->GetAssetInformationResult->Asset->Entitlements->EntitlementData;
         $entitlement_data = is_array($entitlement_data) ? $entitlement_data : array($entitlement_data);
         foreach ($entitlement_data as $data) {
             $temp_days = $data->DaysLeft;
             if ($temp_days > $warranty_days_remaining) {
                 $warranty_days_remaining = $temp_days;
                 $warranty_end_date = date('Y-m-d', strtotime($data->EndDate));
             }
             //end if
         }
         //end foreach
     }
     //end if
     if ($warranty_end_date != "") {
         $info['WarrantyEndDate'] = $warranty_end_date;
     }
     //end if
     if ($warranty_days_remaining > -1) {
         $info['WarrantyDaysRemaining'] = $warranty_days_remaining;
     }
     //end if
     return $info;
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:35,代码来源:Dell.php


示例5: GetRegZavod

 public static function GetRegZavod()
 {
     $debug = false;
     $wsdl_url = dirname(__FILE__) . '/RegZavodServicePort.wsdl';
     if (!file_exists($wsdl_url)) {
         echo 'Missing WSDL shema for RegZavodServicePort.wsdl', "\n";
         echo 'WSDL PATH: ', $wsdl_url, "\n";
         die;
     }
     $client = new SoapClient($wsdl_url, array('exceptions' => 0, 'trace' => 1, 'user_agent' => 'Bober'));
     $result = $client->__soapCall('getRegZavod', array());
     if ($debug) {
         var_dump($client->__getFunctions());
         echo 'REQUEST HEADERS:', "\n", $client->__getLastRequestHeaders(), "\n";
         echo 'REQUEST:', "\n", $client->__getLastRequest(), "\n";
         var_dump($result);
         if (is_soap_fault($result)) {
             trigger_error('SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})', E_USER_ERROR);
         }
         print_r($result);
     }
     if ($result != '' && !is_soap_fault($result)) {
         $result = json_decode(json_encode($result), true);
         return $result;
     } else {
         return array();
     }
 }
开发者ID:lidijakralj,项目名称:bober,代码行数:28,代码来源:RegisterZavodov.php


示例6: __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


示例7: overRedirectMax

 /**
  * @test
  */
 public function overRedirectMax()
 {
     // no exception option
     $obj = new CurlSoapClient(null, array('location' => 'http://localhost:8000/tests/server.php?redirect=2', 'uri' => 'http://test-uri/', 'redirect_max' => 1, 'exceptions' => false));
     $response = $obj->test(123);
     $this->assertInstanceOf('SoapFault', $response);
     $this->assertTrue(is_soap_fault($response));
 }
开发者ID:aaharu,项目名称:curlsoapclient,代码行数:11,代码来源:CurlSoapClientTest.php


示例8: check_soap

 /**
  * @param $soapResult
  * @return mixed
  * @throws \Exception
  */
 public static function check_soap($soapResult)
 {
     if (is_soap_fault($soapResult)) {
         $err = "QAS SOAP Fault - " . "Code: {" . $soapResult->faultcode . "}, " . "Description: {" . $soapResult->faultstring . "}";
         error_log($err, 0);
         throw new \Exception($err);
     }
     return $soapResult;
 }
开发者ID:actualys,项目名称:qas-address-validation-api,代码行数:14,代码来源:QuickAddress.php


示例9: dummy

 public static function dummy($client)
 {
     $results = $client->FEDummy();
     printf("appserver status: %s\ndbserver status: %s\nauthserver status: %s\n", $results->FEDummyResult->appserver, $results->FEDummyResult->dbserver, $results->FEDummyResult->authserver);
     if (is_soap_fault($results)) {
         throw new WsfeException($results->faultcode, $results->faultstring);
     }
     return;
 }
开发者ID:lapuntasoft,项目名称:facturacionafip,代码行数:9,代码来源:wsfe-client.class.php


示例10: __call

 /**
  * Execute the request to the server
  *
  * @param string $method
  * @param array $parameters
  */
 public function __call($method, $parameters)
 {
     array_unshift($parameters, $this->token());
     $result = $this->soap()->__soapCall($method, $parameters);
     if (is_soap_fault($result)) {
         return;
     }
     return $this->sanitize($result);
 }
开发者ID:jundelleb,项目名称:laravel-usaepay,代码行数:15,代码来源:Client.php


示例11: dummy

function dummy($client)
{
    $results = $client->FEDummy();
    printf("appserver status: %s\ndbserver status: %s\nauthserver status: %s\n", $results->FEDummyResult->appserver, $results->FEDummyResult->dbserver, $results->FEDummyResult->authserver);
    if (is_soap_fault($results)) {
        printf("Fault: %s\nFaultString: %s\n", $results->faultcode, $results->faultstring);
        exit(1);
    }
    return;
}
开发者ID:lapuntasoft,项目名称:facturacionafip,代码行数:10,代码来源:wsfe-client.php


示例12: getResponse

 /**
  * Get the API ID
  *
  * @return string Returns "self"
  * @access public
  */
 public function getResponse()
 {
     if (is_soap_fault($this->wsResponse)) {
         return json_encode(array('error' => array('code' => $this->wsResponse->faultcode, 'message' => $this->wsResponse->faultstring)));
     }
     if (!is_array($this->wsResponse)) {
         return json_encode(array('result' => $this->wsResponse));
     }
     return json_encode($this->wsResponse);
 }
开发者ID:emielmolenaar,项目名称:ispconfig-wrapper,代码行数:16,代码来源:ISPConfigWS.php


示例13: CallWSAA

function CallWSAA($CMS)
{
    $client = new SoapClient(WSDLA, array('soap_version' => SOAP_1_2, 'location' => URL, 'trace' => 1, 'exceptions' => 0));
    $results = $client->loginCms(array('in0' => $CMS));
    file_put_contents("request-loginCms.xml", $client->__getLastRequest());
    file_put_contents("response-loginCms.xml", $client->__getLastResponse());
    if (is_soap_fault($results)) {
        exit("SOAP Fault: " . $results->faultcode . "\n" . $results->faultstring . "\n");
    }
    return $results->loginCmsReturn;
}
开发者ID:aabcehmt,项目名称:fe,代码行数:11,代码来源:factura.php


示例14: BatchSend

 public function BatchSend($mobiel, $content)
 {
     $client = $this->getSoapClient();
     $param = ['Mobile' => $mobiel, 'Content' => $content, 'Cell' => '', 'SendTime' => ''];
     $param = array_merge($this->getInitParams(), $param);
     $result = $client->__Call('BatchSend', array('paramters' => $param));
     if (is_soap_fault($result)) {
         trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR);
     }
     return $result;
 }
开发者ID:jinghewang,项目名称:yii2-basic,代码行数:11,代码来源:Sms.php


示例15: getInfo

 function getInfo($tag)
 {
     $args = array('guid' => self::GUID, 'applicationName' => 'GLPI', 'serviceTags' => $tag);
     $reponse = parent::__soapCall('GetAssetInformation', array($args));
     //print_r($reponse);
     if (is_soap_fault($reponse)) {
         echo "SOAP Fault: ";
         print_r($reponse);
         return NULL;
     }
     return isset($reponse->GetAssetInformationResult) ? $reponse->GetAssetInformationResult : NULL;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:12,代码来源:dellsoap.class.php


示例16: CallWSAA

function CallWSAA($CMS)
{
    # Now we create a context to specify remote web server certificate checking
    # If you don want to check remote server, you may set verify_peer to FALSE.
    $ctx = stream_context_create(array('ssl' => array('CN_match' => REMCN, 'cafile' => REMCACERT, 'allow_self_signed' => REMSELFSIGN, 'verify_peer' => REMVERIFY)));
    $client = new SoapClient(WSDL, array('stream_context' => $ctx, 'soap_version' => SOAP_1_2, 'location' => WSAAURL, 'exceptions' => 0));
    $results = $client->loginCms(array('in0' => $CMS));
    if (is_soap_fault($results)) {
        exit("SOAP Fault: " . $results->faultcode . "\n" . $results->faultstring . "\n");
    }
    return $results->loginCmsReturn;
}
开发者ID:lapuntasoft,项目名称:facturacionafip,代码行数:12,代码来源:wsaa-client.php


示例17: get

 public function get($comany, $ip, $type = TRUE)
 {
     if ($ip == 'none') {
         $ip = $this->logs->getIP();
     }
     if ($type === 'xml') {
         $typeResult = 'xml';
     } elseif ($type === true) {
         $typeResult = 'json';
     } else {
         $typeResult = false;
     }
     if ($comany == 1 || $comany == 'movistar') {
         $url_base = 'https://pcba.telefonicachile.cl/';
         //$url_base = 'http://apimovistar.baking.cl';
         $url = $url_base . "/dhc/retrieveCustomer.php?wsdl";
         $location = $url_base . "/dhc/retrieveCustomer.php";
     } else {
         if ($typeResult == 'json') {
             echo "company error";
             exit;
         } else {
             return false;
         }
     }
     try {
         $client = @new SoapClient($url, array("connection_timeout" => 25, "soap_version" => SOAP_1_1, "exceptions" => 1, "location" => $location, "trace" => 1));
     } catch (SoapFault $e) {
         $this->logs->error("Error API de movistar: ", $e->faultstring, 'logs_api');
         return false;
     }
     $param = array("request" => array("In" => array("Account" => array('User' => 'dhc', 'Password' => 'ws_475'), "Ip" => $ip)));
     $result = $client->__call("getDatIp", $param);
     if (is_soap_fault($result)) {
         trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR);
     }
     $Out['ip'] = $result->Out->Ip;
     $Out['PhoneNumber'] = $result->Out->PhoneNumber;
     $this->logs->debug("Maldito numero:", $Out, 'logs_api');
     if ($typeResult == 'xml') {
         $result_xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><retrieveCustomer></retrieveCustomer>');
         $result_xml->addChild('ip', $result->Out->Ip);
         $result_xml->addChild('PhoneNumber', $result->Out->PhoneNumber);
         header("Content-Type:text/xml");
         echo $result_xml->asXML();
         exit;
     } elseif ($typeResult == 'json') {
         echo json_encode($Out);
         exit;
     } else {
         return (object) $Out;
     }
 }
开发者ID:rafaelurrutia,项目名称:bmonitor-y-bi,代码行数:53,代码来源:ws.php


示例18: renew

 /**
  * renew existing domain
  * @param  string $domain   .ir domain name
  * @param  integer $duration    currently only 1 and 5 is supported
  * @return array                first value is result in boolean and second is responded message 
  */
 public function renew($domain, $duration)
 {
     try {
         $client = new SoapClient($this->url);
         $res = $client->__soapCall('renewDomain', array('api_user' => $this->api_user, 'api_pass' => $this->api_pass, 'domain' => $domain, 'period' => $duration));
         if (is_soap_fault($res)) {
             return array(false, 'RENEW SOAP FAILED');
         }
         $result = isset($res['status']) && empty($res['status']) ? true : false;
         return array($result, $this->message[$res['status']]);
     } catch (TypeEnforcerException $e) {
         return array(false, $e->getMessage());
     }
 }
开发者ID:hamidsamak,项目名称:faraso-api-library,代码行数:20,代码来源:faraso.class.php


示例19: fetch

 public function fetch($command)
 {
     $client = $this->client;
     if ($client == NULL) {
         return false;
     }
     $params = func_get_args();
     array_shift($params);
     $command = vsprintf($command, $params);
     $result = $client->executeCommand(new SoapParam($command, "command"));
     if (is_soap_fault($client)) {
         throw new Exception("SOAP Error | Faultcode: " . $client->faultcode . " | Faultstring: " . $client->faultstring);
     }
     return $this->getResult($client->__getLastResponse());
 }
开发者ID:oneluiz,项目名称:User-Control-Panel,代码行数:15,代码来源:_soap.php


示例20: soapExchange

 public function soapExchange($data)
 {
     try {
         // set WSDL for authentication and create new SOAP client
         $auth_url = "http://search.webofknowledge.com/esti/wokmws/ws/WOKMWSAuthenticate?wsdl";
         // set WSDL for search and create new SOAP client
         $search_url = "http://search.webofknowledge.com/esti/wokmws/ws/WokSearch?wsdl";
         // array options are temporary and used to track request & response data
         $auth_client = @new SoapClient($auth_url);
         $this->auth_client = $auth_client;
         // array options are temporary and used to track request & response data
         $search_client = @new SoapClient($search_url);
         // run 'authenticate' method and store as variable
         $auth_response = $auth_client->authenticate();
         $this->auth_response = $auth_response;
         // add SID (SessionID) returned from authenticate() to cookie of search client
         $search_client->__setCookie('SID', $auth_response->return);
         $this->search_client = $search_client;
         // put data into suitable format for API search
         $data = ['queryParameters' => ['databaseId' => 'WOS', 'userQuery' => $data['journal1'] . $data['journal2'] . $data['journal3'] . $data['title1'] . $data['title2'] . $data['title3'], 'editions' => ['collection' => 'WOS', 'edition' => 'SCI'], 'timeSpan' => ['begin' => '1970-01-01', 'end' => date('Y-m-d')], 'queryLanguage' => 'en'], 'retrieveParameters' => ['count' => '100', 'sortField' => [['name' => 'TC', 'sort' => 'D']], 'firstRecord' => '1']];
         $this->data = $data;
         // perform search on data
         try {
             $search_response = $search_client->search($data);
             $this->search_response = $search_response;
         } catch (Exception $e) {
             echo $e->getMessage();
         }
         // number of records found by search, used to finish loop (check if no records first)
         // if soap fault, i.e. no recordsFound then set $len to null to avoid undefined variable
         if (isset($search_response->return->recordsFound)) {
             $len = $search_response->return->recordsFound;
             $this->len = $len;
         } else {
             $len = 0;
             $this->len = $len;
         }
         // check if there has been a soap fault with the query OR if there are 0 records for the search
         if (is_soap_fault($search_client->__getLastResponse()) || $len == 0) {
             echo "NO RECORDS";
             // return view('pages.norecords');
         }
     } catch (\SoapFault $e) {
         echo "THROTTLE SERVER OVERLOAD";
         // return view('pages.throttle');
     }
 }
开发者ID:sebble,项目名称:Academic-Intelligence,代码行数:47,代码来源:SoapWrapper.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_spec函数代码示例发布时间:2022-05-15
下一篇:
PHP is_siteadmin函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap