PHP example of sendWAPPush function usage

MSISDNs parameter is passed as array of type long.

require_once('lib/nusoap/nusoap.php'); 
 
$wsdl = "http://soap.bite.lt/biteapi/services/MessagingPort?wsdl";
$password = 'xxx';
$user = 'xxx';
$service_id = xxx;
$msisdn = '370xxxxxxxx';
 
$client = new soapclient($wsdl);
$headerString = "<provider-service><service-id>$service_id</service-id></provider-service>";
$client->setHeaders($headerString);
$client->setCredentials($user, $password);
 
$param = array(
'acount_ids' => null,
'msisdns' => array(new soapval('item', 'long', $msisdn)),
'URL' => 'http://wap.bite.lt',
'title' => 'BitePlius',
'expirationTime' => new soapval('expirationTime', 'date', '2099-01-01T00:00:00Z'),
'language' => 'LT',
'billAmount' => (float)0.0,
'billCurrency' => 'LTL',
'startDeliveryTime' => new soapval('startDeliveryTime', 'date', date("Y-m-d")."T00:00:00Z"), 
'endDeliveryTime' => new soapval('endDeliveryTime', 'date', date("Y-m-d")."T00:00:00Z"),
'giveNotification' => false);
 
var_dump($client->call('sendWAPPush', $param, "http://biteapi.metasite.net/messaging", 
"http://biteapi.metasite.net/messaging/sendWAPPush"));
 
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';

PHP example of sendSMS function usage

MSISDNs parameter is passed as array of type long.

require_once('lib/nusoap/nusoap.php'); 
 
$wsdl = "http://soap.bite.lt/biteapi/services/MessagingPort?wsdl";
$password = 'xxx';
$user = 'xxx';
$service_id = xxx;
$msisdn = '370xxxxxxxx';
 
$client = new soapclient($wsdl);
$headerString = "<provider-service>
<service-id>$service_id</service-id></provider-service>";
$client->setHeaders($headerString);
$client->setCredentials($user, $password);
 
$param = array(
'acount_ids' => null,
'msisdns' => array(new soapval('item', 'long', $msisdn)),
'billAmount' => (float)0.0,
'billCurrency' => 'LTL',
'smsSender' => '123',
'smsBody' => 'test msg',
'smsLanguage' => 'LT',
'smsHeaders' => null,
'startDeliveryTime' => new soapval('startDeliveryTime', 
'date', date("Y-m-d")."T00:00:00Z"), 
'endDeliveryTime' => new soapval('endDeliveryTime', 
'date', date("Y-m-d")."T00:00:00Z"),
'giveNotification' => false);
 
var_dump($client->call('sendSMS', $param, "http://biteapi.metasite.net/messaging", 
"http://biteapi.metasite.net/messaging/sendSMS"));
 
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
 
faq8.txt · Last modified: 2007/09/25 15:32 by simonas