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;
         }
     }
 }
Exemple #2
0
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;
}
 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;
     }
 }
 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;
     }
 }
 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);
 }
 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;
                 }
             }
         }
     }
 }
 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);
     }
 }
Exemple #8
0
 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;
 }
Exemple #9
0
<?php
	require_once("lib/nusoap.php");
	header("Content-type: text/html; charset=utf-8");
	$client = new soapclient('http://127.0.0.1/nusoap/nusoap_server.php');
	$parameters=array("字符串1",'字符串2');
	$str=$client->call('concatenate',$parameters);
	if (!$err=$client->getError()) {
		echo " 程序返回 :",$str;
	} else {
		echo " 错误 :",$err;
	}
?> 
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&amp;query=' . urlencode($query) . '&amp;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;
}
Exemple #11
0
 *	Creation date: 13-03-2009
 *	Last modification: 22-05-2009 by Maria Alejandra Trujillo Valencia
 *
*/
$type = $_GET["type"];
$list_id = $_GET["list_id"];
$archive_id = $_GET["archive_id"];
//** SE INCLUYE LA CLASE DE SOAP **//
require "nusoap-0.7.3/lib/nusoap.php";
//** SE CREA EL CLIENTE **//
$url_server = "http://ezwebdev.eurodyn.com/mailing-services/serverMailmanLists";
$cliente = new soapclient("" . $url_server . "?wsdl", "true");
$proxy = $cliente->getProxy();
//** LLAMA AL METODO QUE SE NECESITA **//
$uri = $_SERVER["REQUEST_URI"];
$list = explode("?", $uri);
$sizeList = sizeOf($list);
if ($sizeList > 1) {
    $resultado = $proxy->ListList((string) "lists/" . $list[1] . "/archives.json");
} else {
    $resultado = $proxy->ListList((string) "lists.json");
}
//** SE REVISAN ERRORES **//
if (!$cliente->getError()) {
    print_r($resultado);
} else {
    echo "<h1>Error: " . $cliente->getError() . "</h1>";
}
?>

 function process_thanks(&$vars)
 {
     global $db;
     require_once 'lib/nusoap.php';
     if ($this->config['testmode']) {
         $url = "https://sandbox.api.bidpay.com/ThirdPartyPayment/v1/ThirdPartyPaymentService.asmx";
     } else {
         $url = "https://api.bidpay.com/ThirdPartyPayment/v1/ThirdPartyPaymentService.asmx";
     }
     $client = new soapclient($url, true);
     $err = $client->getError();
     if ($err) {
         return "Error: " . $err;
     }
     $vars = array('TransactionID' => '');
     $headers = "";
     $result = $client->call('ThirdPartyPaymentStatus', array('ThirdPartyPaymentStatusRequest' => $vars), 'http://api.bidpay.com/ThirdPartyPayment/v1/Messages/ThirdPartyPaymentStatusRequest-1-0', 'http://api.bidpay.com/ThirdPartyPayment/v1/Messages/ThirdPartyPaymentStatusRequest-1-0', $headers);
     if ($client->fault) {
         return "Soap Request Fault [" . $client->getError() . "]";
     } else {
         $err = $client->getError();
         if ($err) {
             return "Error " . $err;
         } else {
             /*
             TransactionID This is the ID assigned to the new status transaction by BidPay.
             OriginalPaymentRequestTransactionID This is the Transaction ID that was passed in the request.
             OrderID This is the Order ID assigned to the order by BidPay. If there is no Order ID, the buyer never completed the transaction.
             OrderStatus This is the status of the order. Values include Pending, Approved, Denied, Cancelled by Request, Cancelled as Duplicate, and Cancelled.
             CreditCardChargeStatus This is the status of the buyer’s credit card charge. Values include Pending, Authorized, Declined, Billed, and Cancelled.
             AchPaymentStatus This is the status of the ACH payment going out to the seller. Values include In Process, Payment Declined - Waiting on Customer Correction, Payment Completed, Cancelled, and Stop Payment.
             CreditCardRefundStatus This is the status of the credit card refund (when applicable). Values include In Process, Refund Completed, and Cancelled.
             */
             $err = $db->finish_waiting_payment(intval($vars['payment_id']), 'bidpay', $vars['transaction_id'], '', $vars);
             if ($err) {
                 return _PLUG_PAY_BIDPAY_ERROR . $err;
             }
         }
     }
 }
Exemple #13
0
 /**
  * Performs actual call to Google API.
  * @param query string params array
  * @return array boolean
  * @access private
  */
 function call($query, $params)
 {
     $soapclient = new soapclient($this->wsdlURL, 'wsdl', $this->nameSpace);
     if ($this->error = $soapclient->getError()) {
         //comment out echo, if you want to handle errors yourself using getError().
         //echo "Error instantiating SOAP client: " . $this->error;
         return false;
     }
     $result = $soapclient->call($query, $params);
     if ($this->error = $soapclient->getError()) {
         //comment out echo, if you want to handle errors yourself using getError().
         //echo "Error executing query: " . $this->error;
         return false;
     }
     return $result;
 }
Exemple #14
0
    /** Task to refresh available dids cart items
    */
    function refresh() {
    	# read configuration
    	$this->config();
    	
    	# include the soap classes
    	include_once(PATH_INCLUDES."nusoap/lib/nusoap.php");
		# Include the voip class
		include_once(PATH_MODULES.'voip/voip.inc.php');
		$voip = new voip;
    	
    	$db =& DB();
		$client = new soapclient("http://didx.org/cgi-bin/WebGetListServer.cgi", false);

		$err = $client->getError();
		if ($err) {
			global $C_debug;
			$C_debug->error('DIDX.php', 'refresh', 'Could not acquire information from DIDx.org');
		} else {
			$entries = split("\r\n", $this->country_area);
			foreach ($entries as $entry) {
				$eparts = split(":", $entry);
				$areas = split(",", $eparts[1]);
				$bDelete = true;
				foreach ($areas as $area) {
					$params = array(
						'UserID' 		=> $this->user,
						'Password' 		=> $this->pass,
						'CountryCode' 	=> $eparts[0],
						'AreaCode' 		=> $area
					);
					$result = $client->call('getAvailableDIDS', $params, 'http://didx.org/GetList');

					unset($queue);
					while (is_array($result) && (list($k,$v)=each($result)) !== false) {
						if (is_array($v)) {
							if ($v[0] < 0) {
								# error occured, let's log it!
								$this->log_message('refresh', 'SOAP Response: '.$this->codes[$v[0]]);
							} else {
								if ($eparts[0] == '1') {
									;
								} else {
									$v[0] = "011".$v[0];
								}
								# got a phone number! let's insert it into the pool
								$cc = ""; $npa = ""; $nxx = ""; $e164 = "";
								if ($voip->e164($v[0], $e164, $cc, $npa, $nxx)) {
									unset($fields);
									$fields['country_code'] = $cc;
									$fields['voip_did_plugin_id'] = $this->id;
									if ($cc == '1') {
										$fields['station'] = substr($e164, 8);
										$fields['npa'] = $npa;
										$fields['nxx'] = $nxx;
									} else {
										$fields['station'] = substr($e164, 4 + strlen($cc));
									}
									$rs = $db->Execute( sqlSelect($db,"voip_pool","id","country_code=::".$cc.":: AND voip_did_plugin_id=::".$this->id.":: AND station=::".$fields['station']."::"));
									if ($rs->RecordCount() == 0) {
										$queue[] = sqlInsert($db,"voip_pool",$fields);
									}
								} else {
									$this->log_message('refresh', 'Could not parse the phone number returned: '.$v[0]);
								}
							}
						}
					}
					if (isset($queue) && is_array($queue) && count($queue)) {
						if ($bDelete) {
							# kill db entries
							$sql = "DELETE FROM ".AGILE_DB_PREFIX."voip_pool WHERE 
								voip_did_plugin_id=".$this->id." AND (account_id IS NULL or account_id=0)
								AND country_code=".$eparts[0]."
								AND (date_reserved IS NULL or date_reserved=0)";
							$db->Execute($sql);
							$bDelete = false;
						}
						foreach ($queue as $q) {
							$db->Execute($q);
						}
					}
				} # end foreach area
			} # end foreach entries
		}
    }
 function serp($terms, $startFrom = 0)
 {
     global $wgGoogleAPIKey;
     global $wgUser;
     // prepare an array of input parameters to be passed to the remote   procedure
     // doGoogleSearch()
     $params = array('Googlekey' => $wgGoogleAPIKey, 'queryStr' => $terms, 'startFrom' => $startFrom, 'maxResults' => 10, 'filter' => true, 'restrict' => '', 'adultContent' => true, 'language' => '', 'iencoding' => '', 'oencoding' => '');
     // create a instance of the SOAP client object
     $soapclient = new soapclient("http://api.google.com/search/beta2");
     // uncomment the next line to see debug messages
     // $soapclient->debug_flag = 1;
     $MyResult = null;
     $MyResult = $soapclient->call("doGoogleSearch", $params, "urn:GoogleSearch", "urn:GoogleSearch");
     $err = $soapclient->getError();
     if ($err) {
         //error_log("GoogleAPI: An error occurred! $err {$soapclient->response}\n");
         return null;
     }
     /* Uncomment next line, if you want to see the SOAP envelop, which is forwarded to Google server, It is important to understand the content of SOAP envelop*/
     // echo '<xmp>'.$soapclient->request.'</xmp>';
     /* Uncomment next line, if you want to see the SOAP envelop, which is received from Google server. It is important to understand the SOAP packet forwarded from Google Server */
     // echo '<xmp>'.$soapclient->response.'</xmp>';
     // Print the results of the search
     //if ($MyResult['faultstring'])
     // echo $MyResult['faultstring'];
     //echo "errors?" . $MyResult['faultstring'];
     //echo "query: " . $MyResult['searchQuery'];
     //echo "count: " . $MyResult['estimatedTotalResultsCount'];
     //is_array($MyResult['resultElements']))
     //foreach ($MyResult['resultElements'] as $r)
     //echo "<tr><td>[$i] <a href=" . $r['URL'] . ">" . $r['title'] . "</a>";
     //echo $r['snippet'] . "(" . $r['cachedSize'] . ")</td></tr>";
     $result = array();
     $result[] = $MyResult['resultElements'];
     //$result[]= gSearch::suggest($terms);
     //return $MyResult['resultElements'];
     return $result;
 }
// 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'];
            } else {
                $data = $result['TicketGroup'];
                if ($data != '') {
$query_result = mysql_query($bsql) or die('table AdjacencyListCategories_temp create failed: ' . mysql_error());
print_message("Done.");
// create client object
$soapclient = new soapclient($serverpath);
$soapclient->timeout = 500;
$soapclient->response_timeout = 500;
//set soap Action
$method = 'GetAllCategories';
$soapAction = $namespace . $method;
$param = array('SecurityToken' => "{$securitytoken}");
print_message(" Invoking {$method} web method..... ");
// make the call
$result = $soapclient->call($method, $param, $namespace, $soapAction);
$num_categories_returned = 0;
print_message("Done calling {$soapAction}");
if ($soapclient->getError()) {
    print_message("ImportCategoriesFromWS: Error for calling  {$soapAction} \nSTART_GET_ERROR\n" . $soapclient->getError() . "\nEND_GET_ERROR\nSTART_DEBUG_STR\n" . $soapclient->debug_str . "\nEND_DEBUG_STR\n");
    mysql_close($dbh);
    die;
} else {
    print_message("ImportCategoriesFromWS: Importing data....");
    // if a fault occurred, output error info
    if (isset($fault)) {
        print_message(" Error: {$fault}");
        mysql_close($dbh);
        die;
    } else {
        if ($result) {
            if (isset($result['faultstring'])) {
                print_message("Error:" . $result['faultstring']);
                mysql_close($dbh);
Exemple #18
0
 *	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) {
        echo '<h2>Error</h2><pre>' . $err . '</pre>';
Exemple #19
0
 /**
  * Ricevi singolo MMS
  *
  *
  * @param string       mmsid (Id del messaggio precedentemente ricevuto dal gagteway
  * MMS durante la fase di alert (fase 1)
  * vedere la documentazione relativa al servizio di ricezione MMS) (opzionale)
  *
  * @returns array      contiene la struttura dell'MMS.
  *
  * Esempio di struttura ritornata (MMS inviato da un nokia N70) :
  * 
  *
  * Array
  *  (
  *	[phone] => +392222222
  *	[subject] => prova mms
  *	[timestamp] => 2007-09-12 11:13:24
  *	[attachments] => Array
  *				   (
  *		   [0] => Array
  *					 (
  *			 [type] => image/jpeg
  *			 [filename] => 10082007.jpg
  *			 [content] = 	  
  *              /9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH....
  *
  *					 )
  *
  *		   [1] => Array
  *				 (
  *			 [type] => application/smil
  *			 [filename] => <1785700435>
  *			 [content] =>  <smil><head><layout><root-layout width="176" 
  *				height="208"/><region id="Image" width="160" height="120" top="68" 
  *				left="8" fit="meet"/><region id="Text" width="160" height="58" 
  *				top="5" left="8" fit="scroll"/></layout></head><body><par 
  *				dur="5000ms"><img region="Image" src="10082007.jpg"/><text 
  *				region="Text" src="001prova.txt"/></par></body></smil>
  *
  *				 )
  *
  *		   [2] => Array
  *				  (
  *			  [type] => text/plain
  *			  [filename] => 001prova.txt
  *			  [content] => 001prova invio mms
  *
  *			  )
  *
  *		   )
  *
  *  )
  *
  *  
  *
  */
 function recvMms($mmsid = "")
 {
     if ($this->checkVersion() == 4) {
         require_once 'lib-nusoap.inc.php';
         $client = new soapclient('http://mmsgw.mobyt.it/mms-soap/?wsdl', true);
         $err = $client->getError();
         if ($err) {
             trigger_error('Errore nella creazione del client SOAP: ' . $err, E_USER_ERROR);
         }
         $res = $client->call('recvMms', array($this->login, $this->pwd));
         if ($client->fault) {
             return join(' ', $res);
         } else {
             if ($err) {
                 trigger_error('Errore la call di recvMms: ' . $err, E_USER_ERROR);
             } else {
                 return $res;
             }
         }
     } else {
         $client = new SoapClient('http://mmsgw.mobyt.it/mms-soap/?wsdl', array('login' => $this->login, 'password' => $this->pwd));
         $res = $client->recvMms($this->login, $this->pwd);
         if (!$res) {
             trigger_error('Errore durante la call di recvMms: ' . $e->__toString(), E_USER_ERROR);
             return false;
         }
         if (is_soap_fault($res)) {
             trigger_error("Errore SOAP: (faultcode: {$res->faultcode}, faultstring: {$res->faultstring})", E_USER_ERROR);
         } else {
             return $res;
         }
     }
 }