|
Service: SSMSService |
Help |
|
Description |
|
This web service provides the following
operations:
|
|
HowTo |
|
To use this web service you have to login to
the system and get the SessionKey which is required by every function. Also
you should logoff when the session is no longer needed. Example: if (Login('un','123',Sk,FN,UID)) then begin GetUserBalanceQuota(SK); Logoff(SK); end; |
Operations
|
Name |
Parameters |
Returns |
Functionality |
|||||||||||||||||||||||||||||||||
|
Login |
|
Boolean: true: when authentication succeeds false: when authentication fails |
This function is required
before executing any other function to retrieve the SessionKey. If the
username and password were correct and the system authenticate them successfully,
the function will return true and will return the SessionKey, FullName and UserID
of the user, otherwise, it returns false. |
|
||||||||||||||||||||||||||||||||
|
Logoff |
|
Boolean True: logoff succeeds False: logoff fails |
It's recommended that this
function is called after the session is no longer needed. |
|
||||||||||||||||||||||||||||||||
|
SendSMSToPhones
|
|
Boolean True: Sending is in progress. False: Sending fail |
This function sends bulk messages to the
provided phone numbers with the MsgText as the messages text and NickName as
the Nick name of the sender This function assigns the values of param2
and param3 to all messages sent by each call. So the user can differentiate between
messages sent by different calls. |
|
||||||||||||||||||||||||||||||||
|
SendMultiSMS
|
|
Boolean True: Sending is in progress. False: Sending fail |
This function sends multi
sms messages passed to it. Each message is encapsulate into an object of type
TSMSMessage and
grouped in a list. |
|
||||||||||||||||||||||||||||||||
|
STCLinkStatus
|
|
Boolean True: The Link is OK False: The Link is disconnected |
This function returns the
status of the STC Link. if it is connected it returns true, otherwise,
returns false |
|
||||||||||||||||||||||||||||||||
|
GetUserBalanceQuota |
|
Integer |
This function returns the
Current Quota of the user, otherwise it returns -1 |
|
||||||||||||||||||||||||||||||||
|
ViewReporting |
|
For more information about TReportR click on
the link. |
This function return report information
about the user with this session key This information could be periodic or at any
time and can be defragmented to be returned as
segments as from 1 to 10 then from 11 to 20 and so. the return value is of type TReportR Otherwise, nil or null is returned. |
|
||||||||||||||||||||||||||||||||
|
ViewDetails |
|
TReportDetailsR it returns a list of TReportRecordDetR Objects
indexed by Message ID For more information about TReportRecordDetR click
on the link. |
This function gives more details about sending transaction which has the specified
client id Returned records can be defragmented
to be returned as segments as from 1 to 10 then from 11 to 20 and so. |
|
|
TSMSMessage |
class |
Attributes
|
Name |
Type |
Description |
|
MsgText |
WideString |
The text of the message to
be sent. |
|
NickName |
WideString |
The nick name of sender of
the messages to be sent |
|
Param2 |
WideString |
This parameter is
customizable. For example, it can represent the department number and will be
displayed in the report. |
|
Param3 |
WideString |
This parameter is
customizable. For Example, it can represent the employee number and will be
displayed in the report. |
|
EngAr |
Integer |
If the message text has only
Latin characters then this parameter should be 0 if it contains Arabic
characters then this parameter should be 1. |
|
Phone |
WideString |
phone number to which the
sms message will be sent |
|
TDateTimeR |
class |
Attributes
|
Name |
Type |
Description |
|
Year |
Integer |
Format
[YYYY],2005,2004 |
|
Month |
Integer |
Format: [nn],[1-12] |
|
Day |
Integer |
Format: [dd]
[1-31] |
|
Hour |
Integer |
Format: [hh]
[0-23] |
|
Minute |
Integer |
Format [mm] [0-60] |
|
TReportR |
class |
Attributes
|
Name |
Type |
Description |
|
ReportHeaderR
|
General Information about
the user trying to Generate the report |
|
|
ReportTableR
|
TReportTableR
|
List of TReportRecordR objects
indexed by message id |
|
RecordsCount
|
Integer |
Number of Records returned
in the Table. |
|
TReportHeaderR |
class |
Attributes
|
Name |
Type |
Description |
|
UserID |
Integer |
User ID of the user trying
to generate report |
|
UserName |
WideString |
User Name of the user trying
to generate report |
|
UserPhone
|
WideString |
The phone number of the user
trying to generate report |
|
MemberSince
|
Not Activated |
|
|
RegisteredCredit
|
Integer |
The original quota when the
user registered |
|
CreditLeft
|
Integer |
The current balance the user
has |
|
LastAcctUpd
|
Not Activated |
|
|
Email |
WideString |
email of the user if applied |
|
AutoReport
|
Integer |
Not Activated |
|
TReportRecordR |
class |
Attributes
|
Name |
Type |
Description |
|
Phone |
WideString |
Sender or user's phone
number |
|
MsgID |
Integer |
Message id of the current
sms message |
|
MsgText |
WideString |
the message text of
the sms message |
|
Receiver |
WideString |
List of receivers according
to the Parma2 and param3 values |
|
MsgDateTime
|
Sending Date time |
|
|
DividedInto
|
Integer |
No of messages this sms
message have |
|
Total |
Integer |
No of messages should be sent |
|
ActualSent
|
Integer |
No of messages sent successfully |
|
UserID |
Integer |
User id of the sender |
|
ClientID |
Integer |
Client ID that identifies
the send transaction |
|
Direction |
Integer |
Is it Sent[1] or Received[2] |
|
MsgRef |
Integer |
Reference of the message
that identifies the message among other messages in the same transaction |
|
RecordsCount
|
Integer |
Number of Records |
|
ProviderID |
Integer |
not applicable |
|
TReportRecordDetR |
class |
Attributes
|
Name |
Type |
Description |
|
MsgID |
Integer |
Message ID of the SMS
message |
|
Group |
WideString |
Name of the group or
Department related to param2 |
|
Member |
WideString |
Name of the Member of the
Group or employee of the department related to param3 |
|
Phone |
WideString |
If the message was sent to
numbers then they will be in this parameter |
|
Status |
WideString |
P="Pending" ,
E="Fail with error" , S="Success" ,
O="OK", F="Message Centre Queue Full" |
Delphi: procedure Test(Sender:
TObject); var
SMSService:ISSMSService;
SK,FN:WideString;
UID:Integer;
begin
SMSService:=GetISSMSService(); if SMSService.Login('UserName','PWD',SK,FN,UID)
then begin
SMSService.SendSMSToPhones('05xxxxxxxx;05xxxxxxxx,'TestDelphi','TestSms','','',0,SK); SMSService.Logoff(SK);
end; end; C# : private void Test(object sender, System.EventArgs e) { ISSMSServiceservice SMSService=new ISSMSServiceservice();
string SK="",FN="";
int UID=0; if (SMSService.Login("UserName","PWD",ref SK,ref FN,ref UID))
{
SMSService.SendSMSToPhones("05xxxxxxxx;05xxxxxxxx","TestC#","TestSMS","","",0,SK); SMSService.Logoff(SK);
} }
Example: