本文整理匯總了PHP中soapclient::call方法的典型用法代碼示例。如果您正苦於以下問題:PHP soapclient::call方法的具體用法?PHP soapclient::call怎麽用?PHP soapclient::call使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類soapclient
的用法示例。
在下文中一共展示了soapclient::call方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: soapclient
function run_transaction($vars, $method = 'threeDSecureEnrolmentRequest')
{
$client = new soapclient($u = 'https://www.secpay.com/java-bin/services/SECCardService?wsdl', true);
$err = $client->getError();
if ($err) {
return array('message' => sprintf(_PLUG_PAY_SECPAY_ERROR, $err));
}
$result = $client->call($method, $vars, "http://www.secpay.com");
// Check for a fault
if ($client->fault) {
if ($err) {
return array('message' => _PLUG_PAY_SECPAY_ERROR2 . join(' - ', array_values($result)));
}
} else {
// Check for errors
$err = $client->getError();
if ($err) {
return array('message' => sprintf(_PLUG_PAY_SECPAY_ERROR3, $err));
} else {
if ($result[0] == '?') {
$result = substr($result, 1);
}
$ret = $this->reparse($result);
return $ret;
}
}
}
示例2: PinPaymentEnquiry
function PinPaymentEnquiry($_authority)
{
$soapclient = new soapclient('https://pec.shaparak.ir/pecpaymentgateway/eshopservice.asmx?wsdl', 'wsdl');
if (!$soapclient or $err = $soapclient->getError()) {
echo $err . "<br />";
return FALSE;
} else {
$status = $_status;
$params = array('pin' => $this->pin, 'status' => $status, 'authority' => $_authority);
// to see if we can change it
$sendParams = array($params);
$res = $soapclient->call('PinPaymentEnquiry', $sendParams);
$status = $res['status'];
return $status;
}
}
示例3: webServiceAction_nusoap
/**
* The nuSoap client implementation
*
* @return mixed The web service results
*/
function webServiceAction_nusoap(&$amfbody, $webServiceURI, $webServiceMethod, $args, $phpInternalEncoding)
{
$installed = @(include_once AMFPHP_BASE . "lib/nusoap.php");
if ($installed) {
$soapclient = new soapclient($webServiceURI, 'wsdl');
// create a instance of the SOAP client object
$soapclient->soap_defencoding = $phpInternalEncoding;
if (count($args) == 1 && is_array($args)) {
$result = $soapclient->call($webServiceMethod, $args[0]);
// execute without the proxy
} else {
$proxy = $soapclient->getProxy();
//
$result = call_user_func_array(array($proxy, $webServiceMethod), $args);
}
//echo $soapclient->getDebug();
return $result;
} else {
trigger_error("nuSOAP is not installed correctly, it should be in lib/nusoap.php", E_USER_ERROR);
}
}
示例4: wsdl
if (is_null($wsdl)) {
$wsdl = new wsdl($wsdlurl, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$cache->put($wsdl);
} else {
$wsdl->debug_str = '';
$wsdl->debug('Retrieved from cache');
}
$client = new soapclient($wsdl, true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$inputAddresses[] = array('address' => '45 Liberty Blvd.', 'cityName' => 'Malvern', 'countryCode' => 'USA', 'postalCode' => '19355', 'stateName' => 'PA');
$geocodingrequest = array('addressesList' => $inputAddresses);
$params = array('request' => $geocodingrequest, 'check' => "{$login}|{$password}");
$result = $client->call('getLocationsList', $params);
// 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);
示例5: array
$_CLASS['core_user']->user_setup();
require_once SITE_FILE_ROOT . 'includes/nusoap/nusoap.php';
$google_license_key = "dJ5XAtRQFHIlbfutrovVj3TizF1Q2TXP";
$query = get_variable('query', 'POST');
$search_type = get_variable('search_type', 'POST', 0, 'int');
$limit = 10;
if (!$query) {
script_close();
}
$query_command = $query;
if ($search_type === 1) {
$query_command .= ' site:viperals.berlios.de';
}
$params = array('key' => (string) $google_license_key, 'q' => (string) $query_command, 'start' => (int) 0, 'maxResults' => (int) $limit, 'filter' => (bool) true, 'restricts' => (string) '', 'safeSearch' => (bool) false, 'lr' => (string) '', 'ie' => 'UTF-8', 'oe' => 'UTF-8');
$client = new soapclient('http://api.google.com/search/beta2');
$result = $client->call('doGoogleSearch', $params, 'urn:GoogleSearch');
if ($client->fault || $client->getError()) {
script_close();
}
$pagination = generate_pagination('google_search&query=' . urlencode($query) . '&search_type=' . $search_type, $result['estimatedTotalResultsCount'], $limit, 0);
$count = count($result['resultElements']);
$num = 1;
for ($i = 0; $i < $count; $i++) {
$_CLASS['core_template']->assign_vars_array('google_result', array('num' => $num, 'url' => $result['resultElements'][$i]['URL'], 'title' => $result['resultElements'][$i]['title'], 'snippet' => $result['resultElements'][$i]['snippet']));
$num++;
}
unset($result);
$params = array('key' => (string) $google_license_key, 'phrase' => (string) $query);
$spelling_suggestion = $client->call('doSpellingSuggestion', $params, 'urn:GoogleSearch');
if (is_array($spelling_suggestion)) {
$spelling_suggestion = false;
示例6: soapclient
require_once '../include/TicketNetworkWebServices.inc.php';
// require_once('err.php');
echo " Preparing for Import.......";
// create client object
$soapclient = new soapclient($serverpath);
$soapclient->timeout = 500;
$soapclient->response_timeout = 500;
//set soap Action
$method = 'GetTickets';
$soapAction = TND_WS_NAMESPACE . "/" . $method;
# TNServices.asmx?WSDL WorkS!!!!!
$param = array(websiteConfigID => $clientID, numberOfRecords => null, eventID => 721113, lowPrice => null, highPrice => null, ticketGroupID => null, requestedSplit => null, sortDescending => null);
echo "Invoking {$method} method..... ";
$soapclient->debug = 1;
// make the call
$result = $soapclient->call($method, $param, $namespace, $soapAction);
# echo "$soapAction: \nSTART_GET_ERROR\n" . $soapclient->getError() . "\nEND_GET_ERROR\nSTART_DEBUG_STR\n" . $soapclient->debug_str . "\nEND_DEBUG_STR\n";
echo "Done Calling {$soapAction}.";
if ($soapclient->getError() || $soapclient->fault) {
echo "Error for {$soapAction}: \nSTART_GET_ERROR\n" . $soapclient->getError() . "\nEND_GET_ERROR\nSTART_DEBUG_STR\n" . $soapclient->debug_str . "\nEND_DEBUG_STR\n";
die('ImportEventsFromTND.php exiting');
} else {
echo "Importing data.... ";
// if a fault occurred, output error info
$num_tickets = 0;
if (isset($fault)) {
echo "Error: " . $fault;
} else {
if ($result) {
if (isset($result['faultstring'])) {
echo "<h2>Error:</h2>" . $result['faultstring'];
示例7: soapclient
-->
</style></head>
<body>
<h1>Soap Test: Normalize</h1>
<p>Sample Code</p>
<pre class="code">
<code>
require_once('{path_to_soap_library}/nusoap.php');
$c = new soapclient('{path_to_soap_server}/taxamatchsoap.php');
$value = $c->call(
'normalize'
, array('string' => $item)
);
</code>
</pre>
<?php
require_once '../../api/nusoap/lib/nusoap.php';
$p = pathinfo($_SERVER['REQUEST_URI']);
$c = new soapclient('http://' . $_SERVER['SERVER_NAME'] . "/" . $p['dirname'] . '/../../api/taxamatchsoap.php');
print "<p>Here are a list of normalized words.</p>";
$list = array("Carex", "Carex%0A", "Carex%20", "Barbatia (Mesocibota) bistrigata (Dunker, 1866)", "Barbatia (?) bistrigata (Dunker, 1866)", "Aphis [?] ficus Theobald, [1918]");
print "<ul>";
foreach ($list as $item) {
$value = $c->call('normalize', array('string' => $item));
print "<li>Input: <b>{$item}</b><br>Response: <b>{$value}</b><br><br></li>";
}
print "</ul>";
?>
</body>
</html>
示例8: soapclient
<?php
// Pull in the NuSOAP code
require_once 'nusoap.php';
// Create the client instance
$client = new soapclient('http://localhost/phphack/hellowsdl2.php?wsdl', true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}
// Call the SOAP method
$person = array('firstname' => 'Willi', 'age' => 22, 'gender' => 'male');
$result = $client->call('hello', array('person' => $person));
// 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);
示例9: soapclient
<html>
<head><meta charset="UTF-8"></head>
<body>
<?php
require_once 'ws\\nusoap.php';
//Definicao da localização do arquivo WSDL
$wsdl = 'server2.php?wsdl';
//criação de uma instância do cliente
$client = new soapclient($wsdl, true);
//verifica se ocorreu erro na criação do objeto
$err = $client->getError();
if ($err) {
echo "Erro no construtor<pre>" . $err . "</pre>";
}
//chamada do método SOAP
$result = $client->call('hello', array('Meu TESTE'));
//Verifica se ocorreu falha na chamada do método
if ($client->fault) {
echo "Falha<pre>" . print_r($result) . "</pre>";
} else {
//verifica se ocorreu erro
$err = $client->getError();
if ($err) {
echo "Erro<pre>" . $err . "</pre>";
} else {
echo '<h2>Requisição</h2>';
echo '<pre>' . htmlspecialchars($client->request) . '</pre>';
echo '<h2>Resposta</h2>';
echo '<pre>' . htmlspecialchars($client->response) . '</pre>';
// Exibe mensagens para debug
echo '<pre>' . htmlspecialchars($client->response) . '</pre>';
示例10: GetItemSearchParams
function GetItemSearchParams()
{
global $SubscriptionId;
$itemSearchRequest = array('BrowseNode' => '53', 'ItemPage' => 1, 'SearchIndex' => 'Books', 'Sort' => 'salesrank');
$itemSearch = array('SubscriptionId' => $SubscriptionId, 'Request' => array($itemSearchRequest));
return $itemSearch;
}
function GetItemSearchParams2()
{
global $SubscriptionId;
$request = array("Keywords" => "postal stamps", "SearchIndex" => "Books");
$itemSearch = array('SubscriptionId' => $SubscriptionId, 'Request' => $request);
return $itemSearch;
}
if ($method == 'ItemSearch') {
$result = $client->call('ItemSearch', array('body' => GetItemSearchParams()));
} elseif ($method == 'ItemSearch2') {
$result = $client->call('ItemSearch', array('body' => GetItemSearchParams2()));
} elseif ($method == 'CartCreate') {
$result = $client->call('CartCreate', array('body' => GetCartCreateParams()));
} else {
echo "Unsupported method {$method}";
exit;
}
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
示例11: soapclient
<?php
require '/var/www/html/nusoap/lib/nusoap.php';
$client = new soapclient('http://localhost/xmlgenerator/nusoap-estudo/server.php');
$result = $client->call('hello', array('name' => 'Frederich Van Voith'));
print_r($result);
示例12: gatewayNotify
function gatewayNotify($gatewaysLogPath)
{
// Get from bank
$authority = $_GET['au'];
$status = $_GET['rs'];
$cmd_id = intval($_GET['cmd_id']);
$cmd_total = intval($_GET['cmd_total']);
// Set soap
$url = $this->getdialogURL();
if (extension_loaded('soap')) {
$soapclient = new SoapClient($url);
} else {
require_once 'nusoap.php';
$soapclient = new soapclient($url, 'wsdl');
}
// here we update our database
$save_ok = 0;
if ($authority) {
$save_ok = 1;
}
// doing
if ($status == 0 && $save_ok) {
if (!$soapclient || ($err = $soapclient->getError())) {
// this is unsucccessfull connection
$commande = null;
$commande = $this->handlers->h_oledrion_commands->get($cmd_id);
if (is_object($commande)) {
$this->handlers->h_oledrion_commands->setOrderFailed($commande);
$user_log = 'خطا در پرداخت - خطا در ارتباط با بانک';
} else {
$this->handlers->h_oledrion_commands->setFraudulentOrder($commande);
$user_log = 'خطا در ارتباط با بانک - اطلاعات پرداخت شما نا معتبر است';
}
} else {
//$status = 1;
$params = array('pin' => $this->getParsianMid(), 'authority' => $authority, 'status' => $status);
$sendParams = array($params);
$res = $soapclient->call('PinPaymentEnquiry', $sendParams);
$status = $res['status'];
if ($status == 0) {
// this is a succcessfull payment
// we update our DataBase
$commande = null;
$commande = $this->handlers->h_oledrion_commands->get($cmd_id);
if (is_object($commande)) {
if ($cmd_total == intval($commande->getVar('cmd_total'))) {
$this->handlers->h_oledrion_commands->validateOrder($commande);
$user_log = 'پرداخت شما با موفقیت انجام شد. محصول برای شما ارسال می شود';
} else {
$this->handlers->h_oledrion_commands->setFraudulentOrder($commande);
$user_log = 'اطلاعات پرداخت شما نا معتبر است';
}
}
$log .= "VERIFIED\t";
} else {
// this is a UNsucccessfull payment
// we update our DataBase
$commande = null;
$commande = $this->handlers->h_oledrion_commands->get($cmd_id);
if (is_object($commande)) {
$this->handlers->h_oledrion_commands->setOrderFailed($commande);
$user_log = 'خطا در پرداخت - وضعیت این پرداخت صحیح نیست';
} else {
$this->handlers->h_oledrion_commands->setFraudulentOrder($commande);
$user_log = 'وضعیت این پرداخت صحیح نیست - اطلاعات پرداخت شما نا معتبر است';
}
$log .= "{$status}\n";
}
}
} else {
// this is a UNsucccessfull payment
$commande = null;
$commande = $this->handlers->h_oledrion_commands->get($cmd_id);
if (is_object($commande)) {
$this->handlers->h_oledrion_commands->setOrderFailed($commande);
$user_log = 'خطا در پرداخت - این پرداخت نا معتبر است';
} else {
$this->handlers->h_oledrion_commands->setFraudulentOrder($commande);
$user_log = 'این پرداخت نا معتبر است - اطلاعات پرداخت شما نا معتبر است';
}
$log .= "{$status}\n";
}
// Ecriture dans le fichier log
$fp = fopen($gatewaysLogPath, 'a');
if ($fp) {
fwrite($fp, str_repeat('-', 120) . "\n");
fwrite($fp, date('d/m/Y H:i:s') . "\n");
if (isset($status)) {
fwrite($fp, "Transaction : " . $status . "\n");
}
fwrite($fp, "Result : " . $log . "\n");
fwrite($fp, "Peyment note : " . $user_log . "\n");
fclose($fp);
}
return $user_log;
}
示例13: array
$params = array('inputBase64' => base64_encode('You must encode the data you send; NuSOAP will automatically decode the data it receives'));
} else {
$params = array('inputBase64' => null);
}
} else {
echo 'Sorry, I do not know about method ' . $method;
exit;
}
$client = new soapclient('http://www.scottnichol.com/samples/round2_base_server.php?wsdl&debug=1', true, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$client->useHTTPPersistentConnection();
echo '<h2>Execute ' . $method . '</h2>';
$result = $client->call($method, $params);
// 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(!is_bool($result) ? $result : ($result ? 'true' : 'false'));
示例14: UpdateAvailable
/**
* Checks if POG generator has been updated
*
* @return unknown
*/
function UpdateAvailable()
{
$client = new soapclient($GLOBALS['configuration']['soap'], true);
$params = array();
$generatorVersion = base64_decode($client->call('GetGeneratorVersion', $params));
if ($generatorVersion != $GLOBALS['configuration']['versionNumber'] . $GLOBALS['configuration']['revisionNumber']) {
return true;
} else {
return false;
}
}
示例15: tipocambio
function tipocambio($tipo){
switch($tipo){
// parametros requeridos por el web service, 317 hace referencia al valor de compra, 318 hace referencia al valor de venta
case "compra":
$tipo=317;
break;
case "venta":
$tipo=318;
break;
}
require_once('nusoap/lib/nusoap.php');
$instancia= new soapclient('http://indicadoreseconomicos.bccr.fi.cr/IndicadoresEconomicos/WebServices/wsIndicadoresEconomicos.asmx?WSDL', true);
$parametros = array(
"tcIndicador"=>$tipo,
"tcFechaInicio"=>date("d/m/Y"),
"tcFechaFinal"=>date("d/m/Y"),
"tcNombre"=>"Coastal",
"tnSubNiveles"=>"N"
);
$resultado = $instancia->call("ObtenerIndicadoresEconomicosXML",$parametros);
foreach ($resultado as $x => $elemento){
$r= $elemento;
}
$dolar=explode("NUM_VALOR",$r);
$dolar[1]=str_replace("<","",$dolar[1]);
$dolar[1]=str_replace(">","",$dolar[1]);
$dolar[1]=str_replace("/","",$dolar[1]);
return number_format($dolar[1],2);
//return $r;
}