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


PHP nusoap_client::getError方法代码示例

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


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

示例1: connectToVPSServer

function connectToVPSServer($vps_node)
{
    global $pro_mysql_vps_server_table;
    $q = "SELECT * FROM {$pro_mysql_vps_server_table} WHERE hostname='{$vps_node}';";
    $r = mysql_query($q) or die("Cannot query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
    $n = mysql_num_rows($r);
    if ($n != 1) {
        die("Cannot find hostname {$vps_node} of VPS server line " . __LINE__ . " file " . __FILE__);
    }
    $a = mysql_fetch_array($r);
    $port = 8089;
    $soap_client = new nusoap_client("https://{$vps_node}:{$port}/");
    $err = $soap_client->getError();
    if ($err) {
        echo "Error: " . $err;
        return false;
    }
    $soap_client->setCredentials($a["soap_login"], $a["soap_pass"]);
    $err = $soap_client->getError();
    if ($err) {
        echo "Error: " . $err;
        return false;
    }
    return $soap_client;
}
开发者ID:jeremy-cayrasso,项目名称:dtc,代码行数:25,代码来源:vps.php

示例2: getCardInfo

function getCardInfo($merchantnumber, $cardno_prefix, $amount, $currency, $acquirer)
{
    require_once 'lib/nusoap.php';
    global $epayresponse;
    global $fee;
    global $cardtype;
    global $cardtext;
    $returnVal = false;
    //
    // Initialize the nusoap object with the ePay WSDL
    //
    $client = new nusoap_client('https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx?WSDL', 'wsdl', '', '', '', '');
    $err = $client->getError();
    if ($err) {
        echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
        exit;
    }
    //
    // Create an arry with the parameters to the webservice
    //
    $param = array('merchantnumber' => $merchantnumber, 'cardno_prefix' => $cardno_prefix, 'amount' => $amount, 'currency' => $currency, 'acquirer' => $acquirer);
    $result = $client->call('getcardinfo', array('parameters' => $param), '', '', false, true);
    // Check for a fault
    if ($client->fault) {
        echo '<h2>An error occured during webservice</h2><pre>';
        print_r($result);
        echo '</pre>';
    } else {
        // Check for errors
        $err = $client->getError();
        if ($err) {
            //
            // Display the error
            //
            echo '<h2>An error occured during webservice</h2><pre>' . $err . '</pre>';
        } else {
            //
            // Display the result
            //
            /*echo '<h2>Returning values from capturePayment</h2><pre>';
            		print_r($result);
            		echo '</pre>';*/
            if ($result['getcardinfoResult'] == 'true') {
                $returnVal = true;
                $fee = $result['fee'];
                $cardtype = $result['cardtype'];
                $cardtext = $result['cardtypetext'];
            } else {
                //
                // Only use the epayresponse and pbsresponse on errors!
                //
                $epayresponse = $result['epayresponse'];
            }
        }
    }
    return $returnVal;
}
开发者ID:helpfulrobot,项目名称:sunnysideup-payment-epaydk,代码行数:57,代码来源:webservice_fee.php

示例3: findPermissionExternal

 /**
  * @return array
  * @param string $identifier
  */
 public function findPermissionExternal($identifier)
 {
     include 'nusoap/lib/nusoap.php';
     $client = new nusoap_client(Config::factory()->getParam('cmb.cpa.webservice.permission'));
     $response = $client->call('retornaPermissoesSGDOC', array($identifier));
     if ($client->getError()) {
         throw new Exception($client->getError());
     }
     return json_decode($response);
 }
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:14,代码来源:SynchronizerPermissionWebServiceCMB.php

示例4: load

 /**
  * @return array
  */
 public function load()
 {
     include 'nusoap/lib/nusoap.php';
     $client = new nusoap_client(Config::factory()->getParam('cmb.cpa.webservice.unit'));
     $response = $client->call('ListaUnidades');
     if ($client->getError()) {
         throw new Exception($client->getError());
     }
     return json_decode($response);
 }
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:13,代码来源:SynchronizerUnitWebServiceCMB.php

示例5: validate

 /**
  * @return boolean
  * @param string $user
  * @param string $pass
  */
 public function validate($user, $pass)
 {
     include 'nusoap/lib/nusoap.php';
     $client = new nusoap_client(Config::factory()->getParam('cmb.cpa.webservice.authentication'));
     $response = $client->call('validate', array($user, $pass));
     if ($client->getError()) {
         throw new Exception($client->getError());
     }
     return json_decode($response)->valid;
 }
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:15,代码来源:AuthenticationWebServiceCMB.php

示例6: getError

 function getError()
 {
     if (!$this->requestHasBeenExecuted) {
         return false;
     } elseif (!empty($this->results['faultcode'])) {
         return array('Message' => $this->results['faultstring']['!'], 'Type' => $this->results['faultcode']);
     } elseif ($this->client->getError()) {
         return array('Message' => $this->client->getError(), 'Type' => 1);
     } else {
         return $this->results['GetAccountStatusResult']['Exception'];
     }
 }
开发者ID:simpsonjulian,项目名称:puppet-wordpress,代码行数:12,代码来源:ecordia-user-account.class.php

示例7: purge

 /**
  * Purges remote files
  *
  * @param array   $files
  * @param array   $results
  * @return boolean
  */
 function purge($files, &$results)
 {
     if (empty($this->_config['username'])) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, __('Empty username.', 'w3-total-cache'));
         return false;
     }
     if (empty($this->_config['password'])) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, __('Empty password.', 'w3-total-cache'));
         return false;
     }
     require_once W3TC_LIB_DIR . '/Nusoap/nusoap.php';
     $client = new \nusoap_client(W3TC_CDN_MIRROR_AKAMAI_WSDL, 'wsdl');
     $error = $client->getError();
     if ($error) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, sprintf(__('Constructor error (%s).', 'w3-total-cache'), $error));
         return false;
     }
     $zone = $this->_config['zone'];
     $expressions = array();
     foreach ($files as $file) {
         $remote_path = $file['remote_path'];
         $expressions[] = $this->_format_url($remote_path);
     }
     $action = $this->_config['action'];
     $email = $this->_config['email_notification'];
     $email = implode(',', $email);
     $options = array('action=' . $action, 'domain=' . $zone, 'type=arl');
     if ($email) {
         $options[] = 'email-notification=' . $email;
     }
     $params = array($this->_config['username'], $this->_config['password'], '', $options, $expressions);
     $result = $client->call('purgeRequest', $params, W3TC_CDN_MIRROR_AKAMAI_NAMESPACE);
     if ($client->fault) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, __('Invalid response.', 'w3-total-cache'));
         return false;
     }
     $result_code = $result['resultCode'];
     $result_message = $result['resultMsg'];
     $error = $client->getError();
     if ($error) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, sprintf(__('Unable to purge (%s).', 'w3-total-cache'), $error));
         return false;
     }
     if ($result_code >= 300) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, sprintf(__('Unable to purge (%s).', 'w3-total-cache'), $result_message));
         return false;
     }
     $results = $this->_get_results($files, W3TC_CDN_RESULT_OK, __('OK', 'w3-total-cache'));
     return true;
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:57,代码来源:CdnEngine_Mirror_Akamai.php

示例8: funcionEjWS5

function funcionEjWS5($nroTramiteASD, $idTramiteEE, $idNuevoEstado)
{
    //CONEXION A LA BASE DE DATOS
    //Preparación de Datos de Conexión
    $ConexionTipoDB = "postgres";
    $ConexionHost = "localhost";
    $ConexionPuerto = "5433";
    $ConexionNombreDB = "EEMINSAL";
    $ConexionUsuario = "postgres";
    $ConexionPass = "admin";
    $ConexionStringCompleto = "host={$ConexionHost} port={$ConexionPuerto} dbname={$ConexionNombreDB} user={$ConexionUsuario} password={$ConexionPass}";
    //La conexión en si:
    $conn =& ADONewConnection($ConexionTipoDB);
    $conn->PConnect($ConexionStringCompleto);
    //Comando a Ejecutar:
    $cliente22 = new nusoap_client("EjWS5_WebService_Interior.wsdl", true);
    $error22 = $cliente22->getError();
    if ($error22) {
        return $error22;
    }
    // insert de consulta
    $result22 = $cliente22->call("funcionEjWS5_Interior", array("nroTramiteASD22" => 11, "idTramiteEE22" => 22, "idNuevoEstado22" => 33));
    // insert respues
    $each_string = explode('charset=ISO-8859-1', htmlspecialchars($cliente22->response, ENT_QUOTES));
    foreach ($each_string as $key2 => $value2) {
        $dobleexplosion = explode(": ", trim($value2));
        foreach ($dobleexplosion as $key3 => $value3) {
            $tripleexplosion = explode("\n", $value3);
            foreach ($tripleexplosion as $key4 => $value4) {
                if (strpos($value4, 'xml version') !== false) {
                    $rs = $conn->Execute("INSERT INTO sch_minsal.mensajes(id_msg, id_app_origen, id_app_destino, msg, boo_msg_enviado, fecha_envio, fecha_respuesta, id_evento, id_servicio) VALUES (10, 1, 2,'{$value4}', true, '10-10-2010', '10-10-2010', 1, 1);");
                }
            }
        }
    }
    if ($cliente22->fault) {
        return $result22;
    } else {
        $error22 = $cliente22->getError();
        if ($error22) {
            return $error22;
        } else {
            //echo "<h2>Resultado Llamada:</h2><pre>";
            // insert de consulta
            //$rs = $conn->Execute("INSERT INTO sch_minsal.mensajes(id_msg, id_app_origen, id_app_destino, msg, boo_msg_enviado, fecha_envio, fecha_respuesta, id_evento, id_servicio) VALUES (8, 1, 2,'$result22', true, '10-10-2010', '10-10-2010', 1, 1);");
            return $result22;
            //echo "</pre>";
        }
    }
}
开发者ID:ceryxSeidor,项目名称:ProyectoPruebaWSV2,代码行数:50,代码来源:EjWS5_Server.php

示例9: loadUser

 /**
  * @return User
  * @param string $identifier
  */
 public function loadUser($identifier)
 {
     include 'nusoap/lib/nusoap.php';
     $client = new nusoap_client(Config::factory()->getParam('cmb.cpa.webservice.user'));
     $response = $client->call('loadUser', array($identifier));
     if ($client->getError()) {
         throw new Exception($client->getError());
     }
     $userExternal = json_decode($response);
     $userLocal = new stdClass();
     foreach ($userExternal as $attribute => $value) {
         $userLocal->{$attribute} = $value;
     }
     return $userLocal;
 }
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:19,代码来源:SynchronizerUserWebServiceCMB.php

示例10: getStatus

function getStatus($refid)
{
    ini_set("soap.wsdl_cache_enabled", "0");
    //$mkey = '465A86C858B0293DD478D3D664E4B0CB18BC18C0332215CCF7D7C891CA25C3FAA4F5FC7CB187BFDA7233A720A747FB9FDEC866EB8D20D7C262287716F11C48A5';
    $mkey = 'CF82609ADB4A2352966649823625C1217BE486E1B23D4686621EFED077B0B42924B2098F0B36656BAC8B6008576BF05A254B244675B501DA3DF863311BF1BB75';
    $t_ref = $refid;
    //$t_ref = '12345678';
    //$p_id = '3996';
    $p_id = '3944';
    $hasval = $p_id . $t_ref . $mkey;
    $myHASH = hash("sha512", $hasval);
    $wsdlfile = "https://webpay.interswitchng.com/paydirect/services/webpayservice.svc?wsdl";
    $msg = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.interswitchng.com/" xmlns:web="http://schemas.datacontract.org/2004/07/WebPAY.Core.ServiceFramework.Contract"> <soapenv:Header/> <soapenv:Body> <ser:GetTransactionData> <ser:transactionQueryRequest> <web:Hash>' . $myHASH . '</web:Hash> <web:ProductId>' . $p_id . '</web:ProductId> <web:TransactionReference>' . $t_ref . '</web:TransactionReference> </ser:transactionQueryRequest> </ser:GetTransactionData> </soapenv:Body> </soapenv:Envelope>';
    //$s = new nusoap_client($wsdlfile);
    $s = new nusoap_client($wsdlfile, true);
    //$result = $s->call('GetTransactionData', $msg ,'http://services.interswitchng.com/','http://services.interswitchng.com/WebPayService/GetTransactionData');
    $do = $s->send($msg, 'http://services.interswitchng.com/WebPayService/GetTransactionData');
    $result = $s->responseData;
    $err = $s->getError();
    if ($err) {
        // Display the error
        echo '<h2>Network Timeout! </h2><pre></pre><b>Ooopsy! Kindly hit the button below and hit <b>accept/send/yes</b>  on all prompt request.</b><br /><br /><input type="button" value="Please Click here" onClick="document.location.reload(true);">';
    } else {
    }
    return $result;
}
开发者ID:Ghaji,项目名称:form_application,代码行数:26,代码来源:webservice.php

示例11: testConnection

 /**
  * Test connection with values of soap auth administration settings
  */
 public static function testConnection($a_ext_uid, $a_soap_pw, $a_new_user)
 {
     global $ilSetting;
     $settings = $ilSetting->getAll();
     $server_hostname = $settings["soap_auth_server"];
     $server_port = (int) $settings["soap_auth_port"];
     $server_uri = $settings["soap_auth_uri"];
     $namespace = $settings["soap_auth_namespace"];
     $use_dotnet = $settings["soap_auth_use_dotnet"];
     if ($settings["soap_auth_use_https"]) {
         $uri = "https://";
     } else {
         $uri = "http://";
     }
     $uri .= $server_hostname;
     if ($server_port > 0) {
         $uri .= ":" . $server_port;
     }
     if ($server_uri != "") {
         $uri .= "/" . $server_uri;
     }
     $soap_client = new nusoap_client($uri);
     if ($err = $soap_client->getError()) {
         return "SOAP Authentication Initialisation Error: " . $err;
     }
     $soapAction = "";
     $nspref = "";
     if ($use_dotnet) {
         $soapAction = $namespace . "/isValidSession";
         $nspref = "ns1:";
     }
     $valid = $soap_client->call('isValidSession', array($nspref . 'ext_uid' => $a_ext_uid, $nspref . 'soap_pw' => $a_soap_pw, $nspref . 'new_user' => $a_new_user), $namespace, $soapAction);
     return "<br>== Request ==" . '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->request)), ENT_QUOTES) . '</pre><br>' . "<br>== Response ==" . "<br>Valid: -" . $valid["valid"] . "-" . '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->response)), ENT_QUOTES) . '</pre>';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilSOAPAuth.php

示例12: api

 public function api()
 {
     $this->load->library("nusoap");
     $client = new nusoap_client($this->wdsl, 'wsdl', FALSE, FALSE, FALSE, FALSE, 30, 60);
     $client->decode_utf8 = false;
     $err = $client->getError();
     if ($err) {
         return 0;
     }
     $result = $client->call('Fdt_tracking_list', array('b_ma_dvi' => '160', 'b_so_hieu' => '1212'));
     $items = $result['Fdt_tracking_listResult']['TrackingItem'];
     echo "<pre>";
     var_dump($items);
     //        print_r($items);
     //        $result = $client->call('submit', $param, '', '', false, true);
     //        if ($client->fault || $client->getError()) {
     //            echo json_encode($response);
     //            exit;
     //        } else if (isset($result['submitReturn'])) {
     //            $_data = json_decode($result['submitReturn']);
     //            $response["call_id"] = $_data->data->call_id;
     //            if ($response["call_id"] != -1) {
     //                $response["state"] = 1;
     //                $response['msg'] = "Tạo cuộc gọi thành công!";
     //            }
     //        }
 }
开发者ID:RCVDangTung,项目名称:shop_ci,代码行数:27,代码来源:call_api.php

示例13: purge

 /**
  * Purges remote files
  *
  * @param array $files
  * @param array $results
  * @return boolean
  */
 function purge($files, &$results)
 {
     if (empty($this->_config['username'])) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, 'Empty username.');
         return false;
     }
     if (empty($this->_config['password'])) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, 'Empty password.');
         return false;
     }
     if (empty($this->_config['zones'])) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, 'Empty zones list.');
         return false;
     }
     w3_require_once(W3TC_LIB_NUSOAP_DIR . '/nusoap.php');
     $client = new nusoap_client(W3TC_CDN_MIRROR_COTENDO_WSDL, 'wsdl');
     $error = $client->getError();
     if ($error) {
         $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, sprintf('Constructor error (%s).', $error));
         return false;
     }
     $client->authtype = 'basic';
     $client->username = $this->_config['username'];
     $client->password = $this->_config['password'];
     $client->forceEndpoint = W3TC_CDN_MIRROR_COTENDO_ENDPOINT;
     foreach ((array) $this->_config['zones'] as $zone) {
         $expressions = array();
         foreach ($files as $file) {
             $remote_path = $file['remote_path'];
             $expressions[] = '/' . $remote_path;
         }
         $expression = implode("\n", $expressions);
         $params = array('cname' => $zone, 'flushExpression' => $expression, 'flushType' => 'hard');
         $client->call('doFlush', $params, W3TC_CDN_MIRROR_COTENDO_NAMESPACE);
         if ($client->fault) {
             $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, 'Invalid response.');
             return false;
         }
         $error = $client->getError();
         if ($error) {
             $results = $this->_get_results($files, W3TC_CDN_RESULT_HALT, sprintf('Unable to purge (%s).', $error));
             return false;
         }
     }
     $results = $this->_get_results($files, W3TC_CDN_RESULT_OK, 'OK');
     return true;
 }
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:54,代码来源:Cotendo.php

示例14: include_crm

function include_crm()
{
    global $wpdb;
    $table_name = $wpdb->prefix . "crm_config";
    require_once 'lib/nusoap.php';
    $crm_option = $wpdb->get_row("SELECT * FROM " . $table_name . " WHERE id = 0", ARRAY_A);
    $config['sugar_server'] = $crm_option['url'] . "/soap.php?wsdl";
    // the Sugar username and password to login via SOAP
    $config['login'] = array('user_name' => $crm_option['username'], 'password' => $crm_option['password']);
    $config['application_name'] = substr(strrchr($crm_option['url'], '/'), 1);
    ?>


<?php 
    //print_r($config);
    // open a connection to the server
    $sugarClient = new nusoap_client($config['sugar_server'], 'wsdl');
    if (!$sugarClient) {
        echo 'Please check your settings here';
        exit;
    }
    /* echo "<pre>";
    print_r($sugarClient);
    die; */
    $err = $sugarClient->getError();
    if ($err) {
        var_dump($err);
        die("asdfas");
    }
    $sugarClientProxy = $sugarClient->getProxy();
    if (!$sugarClientProxy) {
        echo 'URL is not valid for SugarCRM config settings , please check it out ';
        echo '<a href=' . site_url('wp-admin/admin.php?page=crm_config') . '>Here</a>';
        exit;
    }
    // login using the credentials above
    $result = $sugarClientProxy->login($config['login'], $config['application_name']);
    $session_id = $result['id'];
    /*
    if($session_id  ){
    echo  'UserName or PassWord was wrong. Please Check it out ';
    echo '<a href='.site_url('wp-admin/admin.php?page=crm_config').'>Here</a>';
    exit();
    }
    */
    $result = $sugarClientProxy->seamless_login($session_id);
    ?>

<div id="crm_panel">
<iframe src="<?php 
    echo $crm_option['url'];
    ?>
/index.php?module=Home&action=index&MSID=<?php 
    echo $session_id;
    ?>
" scrolling="auto" frameborder="0" width="100%" height="2000"></iframe>
</div>
<?php 
}
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:59,代码来源:wpr_crm.php

示例15: sendSMS

function sendSMS($para, $mensaje, $fecha, $hora, $titulo = '')
{
    $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
    $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
    $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
    $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
    $client = new nusoap_client('http://sms.krealo.com/smsdev/ServiceSMS.asmx?WSDL', 'wsdl', $proxyhost, $proxyport, $proxyusername, $proxypassword);
    $err = $client->getError();
    if ($err) {
        echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
    }
    // Doc/lit parameters get wrapped
    $Username = "ssalud";
    $KeyName = "OQTZHHYLDQ2C6I57BV50QNZOHMVO730MLMEQR30SLSTIY";
    //Clave Única SDK Mercacel
    $To = $para;
    //Numero de celular de 10 digitos
    $Title = $titulo;
    //Titlo para el mensaje. (No se envia)
    $Message = $mensaje;
    //Mensaje para enviar
    $Date = $fecha;
    //Fecha para envio
    $Time = $hora;
    //Hora para envio
    $param = array("Username" => $Username, "KeyName" => $KeyName, "To" => $To, "Title" => $Title, "Message" => $Message, "Date" => $Date, "Time" => $Time);
    $result = $client->call('SendSMS', array('parameters' => $param), '', '', false, true);
    // Check for a fault
    if ($client->fault) {
        echo '<h2>Fault</h2><pre>';
        print_r($result);
        echo '</pre>';
    } else {
        // Check for errors
        $err = $client->getError();
        if ($err) {
            // Display the error
            echo '<h2>Error</h2><pre>' . $err . '</pre>';
        } else {
            /*// Display the result
            		echo '<h2>Result</h2><pre>';
            		print_r($result);
            		echo '</pre>';*/
        }
    }
}
开发者ID:p4scu41,项目名称:sail,代码行数:46,代码来源:commandSMS.php


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