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


PHP is_soap_fault函数代码示例

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


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


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