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


PHP SoapClient::__getLastRequest方法代码示例

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


在下文中一共展示了SoapClient::__getLastRequest方法的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: requestDebug

 public function requestDebug()
 {
     echo "Last Request:\n\n";
     echo $this->client->__getLastRequestHeaders() . "\n\n";
     echo self::tidyit($this->client->__getLastRequest()) . "\n\n";
     echo $this->client->__getLastResponseHeaders() . "\n\n";
     echo self::tidyit($this->client->__getLastResponse()) . "\n";
 }
开发者ID:juchelka,项目名称:phpCSDatabanking,代码行数:8,代码来源:Client.php

示例3: getDebug

 /**
  * @param bool $response
  * @param bool $request
  * @param SoapClient $soapClient
  * @return string
  */
 public function getDebug($response, $request, SoapClient $soapClient)
 {
     if ($response && $request) {
         return "RAW request:\n" . $soapClient->__getLastRequest() . "\n" . "RAW response:\n" . $soapClient->__getLastResponse() . "\n";
     }
     if ($response) {
         return "RAW response:\n" . $soapClient->__getLastResponse() . "\n";
     }
     if ($request) {
         return "RAW request:\n" . $soapClient->__getLastRequest() . "\n";
     }
     return "";
 }
开发者ID:sereban,项目名称:magento-marketo-integration,代码行数:19,代码来源:Core.php

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

示例5: printLastRequest

 /**
  * Print the last request
  * 
  * @return void
  */
 private function printLastRequest()
 {
     return;
     if ($this->_config()->isLogEnabled($this->storeId)) {
         $this->soapClient->__getLastRequest();
     }
 }
开发者ID:hanicker,项目名称:mailup-magento,代码行数:12,代码来源:MailUpWsImport.php

示例6: __getLastRequest

 /**
  * @return string|null
  */
 public function __getLastRequest()
 {
     if (!$this->xmlDSigAdapter || !$this->debugMode) {
         return parent::__getLastRequest();
     }
     return $this->lastRequest;
 }
开发者ID:fragote,项目名称:xmldsig,代码行数:10,代码来源:SoapClient.php

示例7: soapExecute

 protected function soapExecute($method, $data, $responseNode)
 {
     $xmlResponse = $this->wsClient->{$method}($data)->{$responseNode};
     var_dump($xmlResponse);
     exit;
     $xmlResponse = $this->array_flat(json_decode(json_encode((array) simplexml_load_string($xmlResponse)), true), $arr = []);
     $this->setLastError(null);
     $this->setLastHttpStatusCode(0);
     $this->setLastRawRequest($this->wsClient->__getLastRequest());
     $this->setLastRawResponse($this->wsClient->__getLastResponse());
     $this->setLastRequest($data);
     $this->setLastResponse($xmlResponse);
     if ($this->getLastError()) {
         throw new Exception\SoapException($this->getLastError());
     }
 }
开发者ID:augwa,项目名称:payment-gateway,代码行数:16,代码来源:SoapApi.php

示例8: logSoapCall

 /**
  * Log the last soap call as request and response XML files.
  *
  * @param \SoapClient $client
  * @param string $operation
  */
 public function logSoapCall($client, $operation)
 {
     if (file_exists($this->path)) {
         $fileName = "ryanwinchester-netsuite-php-" . date("Ymd.His") . "-" . $operation;
         $logFile = $this->path . "/" . $fileName;
         // REQUEST
         $request = $logFile . "-request.xml";
         $Handle = fopen($request, 'w');
         $Data = $client->__getLastRequest();
         $Data = cleanUpNamespaces($Data);
         $xml = simplexml_load_string($Data, 'SimpleXMLElement', LIBXML_NOCDATA);
         $privateFieldXpaths = array('//password', '//password2', '//currentPassword', '//newPassword', '//newPassword2', '//ccNumber', '//ccSecurityCode', '//socialSecurityNumber');
         $privateFields = $xml->xpath(implode(" | ", $privateFieldXpaths));
         foreach ($privateFields as &$field) {
             $field[0] = "[Content Removed for Security Reasons]";
         }
         $stringCustomFields = $xml->xpath("//customField[@xsitype='StringCustomFieldRef']");
         foreach ($stringCustomFields as $field) {
             $field->value = "[Content Removed for Security Reasons]";
         }
         $xml_string = str_replace('xsitype', 'xsi:type', $xml->asXML());
         fwrite($Handle, $xml_string);
         fclose($Handle);
         // RESPONSE
         $response = $logFile . "-response.xml";
         $Handle = fopen($response, 'w');
         $Data = $client->__getLastResponse();
         fwrite($Handle, $Data);
         fclose($Handle);
     }
 }
开发者ID:fungku,项目名称:netsuite-php,代码行数:37,代码来源:Logger.php

示例9: __call

 /**
  * Magiczne wywowałanie metody $this->SoapClient->ClassName($args)
  * Opakowane jest przez try-catch, więc od razu obsłużone są wyjątki i zwracany response.
  *
  * Przykład:
  *  $this->authorize($param1, $param2, $param3);
  *  $this->sendRegistries($registries);
  * powoduje uruchomienie:
  *  $this->soapClient->authorize($param1, $param2, $param3);
  *  $this->soapClient->sendRegistries($registries);
  *
  * @param $name
  * @param $arguments
  *
  * @return mixed
  * @throws MK_Exception
  */
 public function __call($name, $arguments)
 {
     if ($this->soapClient instanceof SoapClient) {
         try {
             $response = $this->soapClient->__soapCall($name, $arguments);
             if ($this->debugRequest) {
                 echo $this->debugRow('Last request', $this->soapClient->__getLastRequest());
             }
             if ($this->debugResponse) {
                 echo $this->debugRow('Last response', $this->soapClient->__getLastResponse());
             }
             return $response;
         } catch (SoapFault $e) {
             $debug = $this->debugRequest ? $this->debugRow('Last request', $this->soapClient->__getLastRequest()) : '';
             $debug .= $this->debugResponse ? $this->debugRow('Last response', $this->soapClient->__getLastResponse()) : '';
             throw new MK_Exception($debug . $this->debugRow('SoapFault', $e->getMessage()));
         } catch (Exception $e) {
             $debug = $this->debugRequest ? $this->debugRow('Last request', $this->soapClient->__getLastRequest()) : '';
             $debug .= $this->debugResponse ? $this->debugRow('Last response', $this->soapClient->__getLastResponse()) : '';
             throw new MK_Exception($debug . $this->debugRow('Exception', $e->getMessage()));
         }
     } else {
         throw new MK_Exception('Nie zostało nawiązane połączenie z Brokerem!');
     }
 }
开发者ID:b091,项目名称:mkphp-1,代码行数:42,代码来源:Client.php

示例10: getLastRequest

 /**
  * Retrieve request XML
  *
  * @return string
  */
 public function getLastRequest()
 {
     if ($this->_soapClient !== null) {
         return $this->_soapClient->__getLastRequest();
     }
     return '';
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:12,代码来源:Client.php

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

示例12: checkResult

 /**
  * Check result on errors (both: soap error and sugar's responce error)
  * @param $result
  * @return bool
  */
 protected function checkResult($result)
 {
     $this->fault = null;
     if (defined('SUGAR_SOAP_TRACE')) {
         $this->log($this->_soap->__getLastRequest(), 'DEBUG');
         $this->log($this->_soap->__getLastResponse(), 'DEBUG');
     }
     if (is_soap_fault($result)) {
         $this->fault = array('type' => 'soap', 'code' => $result->faultcode, 'message' => $result->faultstring);
         $this->log("SOAP error {$this->fault['message']}", 'ERROR');
         return false;
     }
     if (isset($result->error) && $result->error->number != 0) {
         $this->fault = array('type' => 'responce', 'code' => $result->error->number, 'message' => $result->error->name);
         $this->log("SOAP sugar responce error {$this->fault['message']}", 'ERROR');
         return false;
     }
     return true;
 }
开发者ID:pasichnichenko,项目名称:yaai_asterisk_logger,代码行数:24,代码来源:SugarSoapAdapter.php

示例13: dumpSoapMessages

 /**
  * Dump Client response and request messages
  *
  * @param   SoapClient  $client  Client instance
  *
  * @return void
  */
 private function dumpSoapMessages($client)
 {
     echo '<br />$client->__getLastRequest():<br />';
     var_dump($client->__getLastRequest());
     echo '<br />$client->__getLastRequestHeaders():<br />';
     var_dump($client->__getLastRequestHeaders());
     echo '<br />$client->__getLastResponse():<br />';
     var_dump($client->__getLastResponse());
     echo '<br />$client->__getLastResponseHeaders():<br />';
     var_dump($client->__getLastResponseHeaders());
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:18,代码来源:soapTest.php

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

示例15: sendRequest

 private function sendRequest($method, $data = array())
 {
     error_reporting(0);
     ini_set('default_socket_timeout', 30);
     $soapClient = new SoapClient(Configure::read('PartTradeApi.url'), array('trace' => 1));
     $response = (array) $soapClient->{$method}($data);
     $this->writeLog('REQUEST', json_encode($data) . "\r\n" . $soapClient->__getLastRequest());
     $this->writeLog('RESPONSE', json_encode($response));
     if (!$response) {
         throw new Exception('PartTradeAPI: No response from server');
     }
     return $response;
 }
开发者ID:Mirocow,项目名称:gpz,代码行数:13,代码来源:PartTradeApi.php


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