本文整理汇总了PHP中soapclient类的典型用法代码示例。如果您正苦于以下问题:PHP soapclient类的具体用法?PHP soapclient怎么用?PHP soapclient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了soapclient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: run_transaction
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;
}
}
}
开发者ID:subashemphasize,项目名称:test_site,代码行数:27,代码来源:secpay.inc.php
示例2: Mist
function Mist($p)
{
$client = new soapclient(WSDL, array('typemap' => array(array("type_ns" => "uri:mist", "type_name" => "A"))));
try {
$client->Mist(array("XX" => "xx"));
} catch (SoapFault $x) {
}
return array("A" => "ABC", "B" => "sss");
}
开发者ID:badlamer,项目名称:hhvm,代码行数:9,代码来源:bug66112.php
示例3: create_soap_client
function create_soap_client()
{
$client = new soapclient('http://siap.ufcspa.edu.br/siap_ws.php?wsdl', true);
$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
}
return $client;
}
开发者ID:GoPlaceIn,项目名称:siacc,代码行数:11,代码来源:siacc_wsclient.php
示例4: PinPaymentEnquiry
public function PinPaymentEnquiry($authorityCode, $status)
{
// instantiate the SOAP client object
$soap = new soapclient($this->wsdl, "wsdl");
// get the SOAP proxy object, which allows you to call the methods directly
$proxy = $soap->getProxy();
// set parameter parameters (PinPaymentEnquiry^)
$parameters = array(pin => $this->pin, authority => $authorityCode, status => $status);
// get the result, a native PHP type, such as an array or string
$result = $proxy->PinPaymentEnquiry($parameters);
return $result;
}
开发者ID:Barnamenevis,项目名称:parsian-payment-gate,代码行数:12,代码来源:class.parsian.php
示例5: Connect
public function Connect()
{
// instantiate wsdl cache manager
if ($this->mDbConfig['db_wsdl_cache_path'] != '' && $this->mDbConfig['db_wsdl_cache_enabled']) {
$wsdl_cache = new wsdlcache($this->mDbConfig['db_wsdl_cache_path'], $this->mDbConfig['db_wsdl_cache_lifetime']);
}
// try to get from cache first...
$wsdl_url = $this->mDbConfig['db_wsdl_url'];
if ($this->mDbConfig['db_namespace']) {
$wsdl_url_query = parse_url($wsdl_url, PHP_URL_QUERY);
if (!$wsdl_url_query) {
$wsdl_url .= '?nspace=' . $this->mDbConfig['db_namespace'];
} else {
$wsdl_url .= '&nspace=' . $this->mDbConfig['db_namespace'];
}
}
if ($wsdl_cache) {
$wsdl = $wsdl_cache->get($wsdl_url);
}
// cache hit? if not, get it from server and put to cache
if (!$wsdl) {
SysLog::Log('Cache MISSED: ' . $wsdl_url, 'SoapDatabaseEngine');
$wsdl = new wsdl($wsdl_url, $this->mDbConfig['db_proxy_host'], $this->mDbConfig['db_proxy_port'], $this->mDbConfig['db_proxy_user'], $this->mDbConfig['db_proxy_pass'], $this->mDbConfig['db_connection_timeout'], $this->mDbConfig['db_response_timeout']);
$this->mErrorMessage = $wsdl->getError();
if ($this->mErrorMessage) {
SysLog::Log('WSDL error: ' . $this->mErrorMessage, 'DatabaseEngine');
$this->mErrorMessage = 'An error has occured when instantiating WSDL object (' . $this->mDbConfig['db_wsdl_url'] . '&nspace=' . $this->mDbConfig['db_namespace'] . '). The error was: "' . $this->mErrorMessage . '" Check your WSDL document or database configuration.';
return FALSE;
}
if ($wsdl_cache) {
$wsdl_cache->put($wsdl);
}
} else {
SysLog::Log('Cache HIT: ' . $this->mDbConfig['db_wsdl_url'] . '&nspace=' . $this->mDbConfig['db_namespace'], 'SoapDatabaseEngine');
}
// use it as usual
$temp = new soapclient($wsdl, TRUE, $this->mDbConfig['db_proxy_host'], $this->mDbConfig['db_proxy_port'], $this->mDbConfig['db_proxy_user'], $this->mDbConfig['db_proxy_pass'], $this->mDbConfig['db_connection_timeout'], $this->mDbConfig['db_response_timeout']);
$this->mErrorMessage = $temp->getError();
if (!$this->mErrorMessage) {
$this->mrDbConnection = $temp->getProxy();
if (isset($this->mDbConfig['db_credentials'])) {
$this->mrDbConnection->setCredentials($this->mDbConfig['db_credentials']['user'], $this->mDbConfig['db_credentials']['pass'], $this->mDbConfig['db_credentials']['type'], $this->mDbConfig['db_credentials']['cert']);
}
return TRUE;
} else {
SysLog::Log('Error in SoapDatabaseEngine: ' . $temp->getError(), 'SoapDatabaseEngine');
return FALSE;
}
}
开发者ID:rifkiferdian,项目名称:gtfw_boostab,代码行数:49,代码来源:SoapDatabaseEngine.class.php
示例6: 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;
}
}
开发者ID:jnaroogheh,项目名称:darvishi,代码行数:16,代码来源:ParsianGateway.php
示例7: invoke
public function invoke($targetObject, $function, $arguments)
{
$proxyhost = '';
$proxyport = '';
$proxyusername = '';
$proxypassword = '';
$client = new soapclient($targetObject, true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
throw new Exception($err);
}
$args = array();
foreach ($arguments as $argument) {
if ($argument instanceof IAdaptingType) {
$args[] = $argument->defaultAdapt();
} else {
$args[] = $argument;
}
}
$serviceDesription;
// if(isset($_SESSION['wsdl'][$targetObject][$function]))
// {
// $serviceDesription = unserialize($_SESSION['wsdl'][$targetObject][$function]);
// var_dump($serviceDesription);
// }
// else
// {
$webInsp = new WebServiceInspector();
$webInsp->inspect($targetObject, $function);
$serviceDesription = $webInsp->serviceDescriptor;
$_SESSION['wsdl'][$targetObject][$function] = serialize($serviceDesription);
// }
$methods = $serviceDesription->getMethods();
$method = null;
foreach ($methods as $method) {
if ($method->getName() == $function) {
break;
}
}
$postdata = array(array());
foreach ($method->getArguments() as $argument) {
$this->getArrayArguments($postdata[0], $argument->getType(), $args);
}
$result = $client->call($function, $postdata);
return new Value($result);
}
开发者ID:sigmadesarrollo,项目名称:logisoft,代码行数:46,代码来源:WebServiceHandler.php
示例8: process_thanks
function process_thanks(&$vars)
{
global $db;
require_once 'lib/nusoap.php';
if ($vars['result'] != 'success') {
return "Payment failed.";
}
$client = new soapclient('http://wsdl.eu.clickandbuy.com/TMI/1.4/TransactionManagerbinding.wsdl', true);
$err = $client->getError();
if ($err) {
return "Error: " . $err;
}
$payment_id = intval($vars['payment_id']);
$pm = $db->get_payment($payment_id);
$product =& get_product($pm['product_id']);
if ($product->config['is_recurring']) {
////// set expire date to infinite
////// admin must cancel it manually!
$p['expire_date'] = '2012-12-31';
$db->update_payment($payment_id, $p);
}
if ($this->config['disable_second_confirmation']) {
$err = $db->finish_waiting_payment($pm['payment_id'], 'clickandbuy', $pm['data']['trans_id'], '', $vars);
if ($err) {
return "Error: " . $err;
}
} else {
$secondconfirmation = array('sellerID' => $this->config['seller_id'], 'tmPassword' => $this->config['tm_password'], 'slaveMerchantID' => '0', 'externalBDRID' => $pm['data']['ext_bdr_id']);
/*Start Soap Request*/
$result = $client->call('isExternalBDRIDCommitted', $secondconfirmation, 'https://clickandbuy.com/TransactionManager/', 'https://clickandbuy.com/TransactionManager/');
if ($client->fault) {
return "Soap Request Fault [" . $client->getError() . "]";
} else {
$err = $client->getError();
if ($err) {
return "Error " . $err;
} else {
$err = $db->finish_waiting_payment($pm['payment_id'], 'clickandbuy', $pm['data']['trans_id'], '', $vars);
if ($err) {
return "Error " . $err;
}
}
}
}
}
开发者ID:subashemphasize,项目名称:test_site,代码行数:45,代码来源:clickandbuy.inc.php
示例9: paynow_check
private function paynow_check($params)
{
$soap = "https://www.paysbuy.com/api_paynow/api_paynow.asmx?WSDL";
$method = 'api_paynow_authentication_new';
$merchant = $this->pay_model->get_merchant_data_by_pay_type($params['pay_type'], $params['method_id']);
$psbID = $merchant['merchant_key'];
$username = $merchant['merchant_name'];
$secureCode = $merchant['merchant_key2'];
// var_dump($psbID);var_dump($username);var_dump($secureCode);die();
$soap_param = array(array('psbID' => $psbID, 'username' => $username, 'secureCode' => $secureCode, 'inv' => $params['order_sn'], 'itm' => 'Buy Gold', 'amt' => $params['pay_amount'], 'paypal_amt' => 1, 'curr_type' => 'TH', 'com' => '', 'method' => 5, 'language' => 'T', 'resp_front_url' => base_url() . 'paysbuy/return_status', 'resp_back_url' => base_url() . 'paysbuy/return_status', 'opt_fix_redirect' => '1', 'opt_fix_method' => '', 'opt_name' => '', 'opt_email' => '', 'opt_mobile' => '', 'opt_address' => '', 'opt_detial' => ''));
$client = new soapclient($soap);
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
$result = $client->__call($method, $soap_param);
$string = $result->api_paynow_authentication_newResult;
// var_dump($string);
return $string;
}
开发者ID:helenseo,项目名称:pay,代码行数:18,代码来源:paysbuy.php
示例10: 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);
}
}
开发者ID:ksecor,项目名称:civicrm,代码行数:26,代码来源:WebServiceActions.php
示例11: inspect
public function inspect($wsdlUrl, $methodName = "")
{
// $wsdlUrl = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl";
// $wsdlUrl = "http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl";
// $wsdlUrl = "http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx?wsdl";
// $methodName = "NotifyPhoneBasic";
$wsdlXml = new DOMDocument();
$wsdlXml->load($wsdlUrl);
/*WebServiceDescriptor*/
$this->serviceDescriptor = new WebServiceDescriptor();
$this->definitions = $wsdlXml->getElementsByTagName("definitions")->item(0)->childNodes;
$this->getTypes();
/*DOMDocument*/
$service = XmlUtil::getElementByNodeName($this->definitions, "service");
/*string*/
$serviceName = $service->documentElement->getAttribute("name");
$this->serviceDescriptor->setName($serviceName);
$proxyhost = '';
$proxyport = '';
$proxyusername = '';
$proxypassword = '';
$client = new soapclient($wsdlUrl, true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
throw new Exception($err);
}
$operations = $client->getOperations($methodName);
// var_dump($operations);
// if(LOGGING)
// Log::log(LoggingConstants::MYDEBUG, ob_get_contents());
foreach ($operations as $operation) {
/*WebServiceMethod*/
$webServiceMethod = new WebServiceMethod();
$this->parseMessageInput($operation['input']['message'], $webServiceMethod);
$webServiceMethod->setReturn($this->parseMessageOutput($operation['output']['message']));
$webServiceMethod->setName($operation["name"], $webServiceMethod);
$this->serviceDescriptor->addMethod($webServiceMethod);
}
}
开发者ID:sigmadesarrollo,项目名称:logisoft,代码行数:39,代码来源:WebServiceInspector.php
示例12: query_tran_detail
private function query_tran_detail($params)
{
$MerchantID = $this->merchantID;
$ReferenceID = $params['order_sn'];
$SecretPIN = $this->secret_pin;
$this->getHeartBeat();
$HeartBeat = $this->heartbeat;
$Signature = sha1(strtolower($MerchantID . $ReferenceID . $SecretPIN . $HeartBeat));
log_message('GASH', 'MOL_WALLET_RETURN_SIGN' . $Signature);
$soap_param = array();
//Sandbox
// $soap = 'http://molv3.molsolutions.com/api/login/s_module/querytrxstatus.asmx?WSDL';
//Live
$soap = 'https://global.mol.com/api/login/s_module/querytrxstatus.asmx?WSDL';
$method = 'queryTrxStatus';
$soap_param = array(array('MerchantID' => $MerchantID, 'MRef_ID' => $ReferenceID, 'HeartBeat' => $HeartBeat, 'Signature' => $Signature));
$client = new soapclient($soap);
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
log_message('GASH', 'MOL_WALLET_SOPA_PARAM' . $soap_param);
$result = $client->__call($method, $soap_param);
$result = $result->queryTrxStatusResult;
log_message("GASH", "MOL_WALLET_QUERY_RESULT" . json_encode($result));
$msg = "儲值失敗,請聯繫遊戲客服" . $result->ResCode . "Status:" . $result->Status;
if ($result->ResCode == 100 && $result->Status == 1) {
$sign = sha1(strtolower($result->ResCode . $MerchantID . $ReferenceID . $SecretPIN . $result->Amount . $result->Currency));
// $msg=$msg."22";
log_message("GASH", "MOL_WALLET_SUCCESS" . json_encode($result));
if ($sign == $result->Signature) {
// $msg=$msg."33";
log_message("GASH", "MOL_WALLET_TRUE_SUCCESS" . json_encode($params));
if ($this->_complete_order($params)) {
$order_info = $this->CI->pay_order->get_recharge_order($params['order_sn']);
log_message("GASH", "MOL_WALLET_TRUE_GAME_SUCCESS" . json_encode($params));
$msg = "儲值成功";
$this->CI->payorder->over($msg, $order_info->order_sn);
return;
}
}
}
$this->CI->payorder->over($msg);
}
开发者ID:helenseo,项目名称:pay,代码行数:42,代码来源:mol_wallet.php
示例13: array
<?php
if (isset($_POST['send'])) {
$uname = $_POST['mail'];
$param12 = array('UserName' => "{$uname}");
$client12 = new soapclient('http://etypeservices.com/service_GetPublicationIDByUserName.asmx?WSDL');
$response12 = $client12->GetPublicationID($param12);
//echo "<pre>";
//print_r($response12);
//echo "</pre>";
if ($response12->GetPublicationIDResult == -9) {
$msg = "Invalid UserName ";
} else {
if ($response12->GetPublicationIDResult == 3053) {
$param = array('UserName' => $uname);
$client = new soapclient('http://etypeservices.com/service_ForgetPassword.asmx?WSDL');
try {
$response = $client->ForgetPassword($param);
if ($response->ForgetPasswordResult == 1) {
$msg = "Credentials have been sent to your registered email";
} else {
$msg = "User is Not Registered For This Publication";
}
} catch (Exception $e) {
echo '' . $e->getMessage();
}
} else {
$msg = "User Not Exists";
}
}
}
?>
开发者ID:etype-services,项目名称:cni-theme,代码行数:31,代码来源:node--191232.tpl.php
示例14: isset
* WSDL client sample.
* Exercises a document/literal NuSOAP service (added nusoap.php 1.73).
* Does not explicitly wrap parameters.
*
* Service: WSDL
* Payload: document/literal
* Transport: http
* Authentication: none
*/
require_once '../lib/nusoap.php';
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';
$client = new soapclient('http://www.scottnichol.com/samples/hellowsdl3.wsdl', true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$client->setUseCurl($useCURL);
$person = array('firstname' => 'Willi', 'age' => 22, 'gender' => 'male');
$name = array('name' => $person);
$result = $client->call('hello', $name);
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
开发者ID:luzma1,项目名称:Laboratorio_7,代码行数:31,代码来源:wsdlclient11.php
示例15: date
$state=$_POST['state'];
$postal=$_POST['postalcode'];
$phone=$_POST['phone'];
$publicationid=$_POST['Publication_Id'];
$planid=$_POST['planId'];
$date = date("Y-m-d");// current date
$expdate = date('Y-m-d', strtotime("+".$_POST['Period']." ".$_POST['PeriodType'].""));
$param=array('Email' =>"$email",'UserName' =>"$UserName",'Password' =>"$Password",'FirstName' =>"$firstname",'LastName'=>"$lastname",'StreetAddress'=>"$address",'City'=>"$city",'State'=>"$state",'PostalCode'=>"$postal",'Phone'=>"$phone",'ExpiryDate'=>"$expdate",'PublicationID'=>"$publicationid",'SubscriptionPlanID'=>"$planid");
}*/
// echo "<pre>";
// print_r($param);
// echo "</pre>";
$publicationid = $_SESSION['Publication_Id'];
$client1 = new soapclient('http://etypeservices.com/Service_GetPublisherPaypalEmailID.asmx?WSDL');
$param1 = array('PublicationID' => "{$publicationid}");
$response1 = $client1->GetPublisherPaypalEmailID($param1);
// echo "<pre>";
// print_r($response1);
// echo "</pre>";
?>
<div style="margin-left:30px">
<form name="form2" method="POST" action="http://www.acadiaparishtoday.com/confirm-payment" enctype="multipart/form-data">
<h3 style="Background:gray;line-height: 2.0em;font-size:16px"><center>REVIEW ORDER</center></h3>
<div style="">
<p>
Your order is almost complete. Please review the details below and click 'Continue' if all the information is correct. You may use the 'Back' button to make changes to your order if necessary.
开发者ID:etype-services,项目名称:lsn,代码行数:31,代码来源:node--55717.tpl.php
示例16: trim
//获取密码
$content = trim($_POST[mess]);
//获取短信内容
$data = date("Y-m-d H:i:s");
//获取时间
$ip = getenv('REMOTE_ADDR');
//获取IP地址
while (list($name, $value) = each($_POST[colleague_tel])) {
//读取要发送的电话号码
if (is_numeric($value) == true) {
//判断电话格式是否正确
$mobilenumber = $value;
//将获取的电话号码附给变量
$msgtype = "Text";
//指定短信为文本格式
/*向数据库中添加发送短信的记录*/
$sql = "insert into tb_short(short_ip,short_tel,short_tels,short_content,short_date,short_title)values('{$ip}','{$userid}','{$mobilenumber}','{$content}','{$data}','{$carrier}')";
$rs = new com("adodb.recordset");
$rs->open($sql, $conn, 3, 3);
//执行添加语句
/*------------------------*/
include 'nusoap/lib/nusoap.php';
//读取PHP类文件,实现短信的发送
/*将数据以数组的形式添加到sendXml方法中*/
$s = new soapclient('http://smsinter.sina.com.cn/ws/smswebservice0101.wsdl', 'WSDL');
$s->call('sendXml', array('parameters' => array('carrier' => $carrier, 'userid' => $userid, 'password' => $password, 'mobilenumber' => $mobilenumber, 'content' => $content, 'msgtype' => $msgtype)));
/*-------------------------------------*/
echo "<script>alert('短信发送成功!');window.location.href='indexs.php?lmbs=连接短信';</script>";
}
}
}
开发者ID:noikiy,项目名称:web,代码行数:31,代码来源:send.php
示例17: isset
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
echo 'You must set your own Via Michelin login and password in the source code to run this client!';
exit;
$login = '';
$password = '';
$wsdlurl = 'http://www.viamichelin.com/ws/services/Geocoding?wsdl';
$cache = new wsdlcache('.', 120);
$wsdl = $cache->get($wsdlurl);
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
开发者ID:Nemeziz,项目名称:nusoap-for-php5,代码行数:31,代码来源:wsdlclient14.php
示例18: isset
require_once '../lib/nusoap.php';
require_once '../lib/class.wsdlcache.php';
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$cache = new wsdlcache('.', 60);
$wsdl = $cache->get('http://www.xmethods.net/sd/2001/BNQuoteService.wsdl');
if (is_null($wsdl)) {
$wsdl = new wsdl('http://www.xmethods.net/sd/2001/BNQuoteService.wsdl', $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>';
}
$params = array('isbn' => '0060188782');
$result = $client->call('getPrice', $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) {
开发者ID:Nemeziz,项目名称:nusoap-for-php5,代码行数:31,代码来源:wsdlclient5.php
示例19: date
$email = $_POST['email'];
$UserName = $_POST['name'];
$Password = $_POST['password'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$postal = $_POST['postalcode'];
$phone = $_POST['phone'];
$publicationid = $_SESSION['Publication_Id'];
$date = date("Y-m-d");
// current date
$expdate = date('Y-m-d', strtotime("+1 week"));
$param = array('Email' => "{$email}", 'UserName' => "{$UserName}", 'Password' => "{$Password}", 'FirstName' => "{$firstname}", 'LastName' => "{$lastname}", 'StreetAddress' => "{$address}", 'City' => "{$city}", 'State' => "{$state}", 'PostalCode' => "{$postal}", 'Phone' => "{$phone}", 'ExpiryDate' => "{$expdate}", 'PublicationID' => "{$publicationid}");
$client = new soapclient('http://etypeservices.com/Service_PrintSubscription.asmx?wsdl');
$response = $client->SubscriberRegistration($param);
if ($response->SubscriberRegistrationResult == -1) {
$msg = "UserName Already Exits";
} else {
if ($response->SubscriberRegistrationResult == -2) {
$msg = "Some Error On Registration";
} else {
if ($response->SubscriberRegistrationResult == 1) {
$msg = "UserName Already Exits or Email is Blank";
} else {
if ($response->SubscriberRegistrationResult == -3) {
$msg = "Email Already Registered Against This Publication";
} else {
drupal_goto('custom-login-page');
}
开发者ID:etype-services,项目名称:lsn,代码行数:31,代码来源:node--64551.tpl.php
示例20: header
header('Content-Type: text/html');
$_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)) {
开发者ID:BackupTheBerlios,项目名称:viperals-svn,代码行数:31,代码来源:ajax.php
注:本文中的soapclient类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论