CMP App Integration Guide
CMP App Integration Guide
With
1 INTRODUCTION ................................................................................................................................... 3
2 FUNCTIONAL OVERVIEW................................................................................................................. 4
2.1 ALL OPERATIONS............................................................................................................................... 4
2.2 RETURN VALUE .................................................................................................................................. 4
2.3 OPERATION SPECIFICATIONS.............................................................................................................. 5
2.3.1 SendTextMessage ......................................................................................................................... 5
2.3.2 SendWAPPush .............................................................................................................................. 6
2.3.3 GetMessageStatus......................................................................................................................... 7
CMP comes with comes with web service to enable the design of external applications and
services to send SMS. This interface supports the transmission of SMS and WAP. Client
applications can request for sending messages and can request message status.
CMP Web Service uses Microsoft Internet Information Server to provide the underlying HTTP
server functionality. The following web methods are currently permitted:
HTTP GET
HTTP POST
HTTP SOAP
Reference:
Service overview: http://cmp.robi.com.bd/WS/CMPWebService.asmx
Service WSDL: http://cmp.robi.com.bd/WS/CMPWebService.asmx?WSDL
Method Description
SendTextMessage To send SMS text messages
SendWAPPush To send WAP push
GetMessageStatus To retrieve the status of a sent message
2.3.1 SendTextMessage
Description:
This function sends a text message via CMP web service.
Signature:
ServiceClass SendTextMessage(String Username, String Password, String
From, String To, String Message)
Parameters:
Samples:
9 HTTP GET:
http://cmp.robi.com.bd/WS/CMPWebService.asmx/SendTextMessage?Username=testu
ser&Password=XXXXXX&From=88018XXXXXXXX&To=8801XXXXXXXXX&M
essage=testmessage
9 HTTP POST:
Here is a simple form which will submit SendTextMessage request to the web service
using HTTP POST.
<form
action="http://cmp.robi.com.bd/WS/CMPWebService.asmx/SendTextM
essage" method="post">
<input type="text" name="Username" value="testuser" />
<input type="text" name="Password" value="XXXXXX" />
<input type="text" name="From" value="88018XXXXXXXX"/>
<input type="text" name="To" value="8801XXXXXXXXX" />
<input type="text" name="Message" value="testmessage"/>
<input type="submit" value="Submit" />
</form>
bd.com.robi.cmp.ServiceClass ReturnValues =
service.SendTextMessage("testuser", "XXXXXX", "88018XXXXXXXX",
"8801XXXXXXXXX", "testmessage");
2.3.2 SendWAPPush
Description:
This function sends a WAP push via Corporate Messaging web service.
Signature
ServiceClass SendWAPPush(String Username, String Password, String
From, String To, String WAPText, String WAPURL)
Parameters
Input fields Type Description
Username String Username that is used for login
Password String Password
From String Originator mobile number
To String Destination mobile number
WAPText String WAP text
WAPURL String WAP URL
Samples:
9 HTTP GET:
http://cmp.robi.com.bd/WS/CMPWebService.asmx/SendWAPPush?Username=testuser
&Password=XXXXXX&From=88018XXXXXXXX&To=8801XXXXXXXXX&WAP
Text=robi&WAPURL=http://wap.robi.com.bd
9 HTTP POST:
Here is a simple form which will submit SendWAPPush request to the web service
using HTTP POST.
<form
action="http://cmp.robi.com.bd/WS/CMPWebService.asmx/SendWAPPush"
method="post">
<input type="text" name="Username" value="testuser" />
<input type="text" name="Password" value="XXXXXX" />
<input type="text" name="From" value="88018XXXXXXXX" />
<input type="text" name="To" value="8801XXXXXXXXX" />
<input type="text" name="WAPText" value="wap" />
<input type="text" name="WAPURL" value="http://wap.robi.com.bd"
/>
<input type="submit" value="Submit" />
</form>
bd.com.robi.cmp.ServiceClass ReturnValues =
service.SendWAPPush("testuser", "XXXXXX", "88018XXXXXXXX",
"8801XXXXXXXXX", "robi", "http://wap.robi.com.bd");
if (ReturnValues.ErrorCode == 0)
Console.WriteLine("WAP push submitted successfully! Message
Id: " + ReturnValues.MessageId);
else
Console.WriteLine("WAP push submission failed");
2.3.3 GetMessageStatus
Description:
This function is for getting status info about a message using a unique identification number
(MessageId).
Signature
ServiceClass GetMessageStatus(String Username, String Password, int
MessageId)
Parameters
Input fields Type Description
Username String Username that is used for login
Password String Password
MessageId int Message reference number e.g.: 22300
Samples:
9 HTTP GET:
http://cmp.robi.com.bd/WS/CMPWebService.asmx/GetMessageStatus?Username=
testuser&Password=XXXXXX&MessageId=22300
9 HTTP POST:
Here is a simple form which will submit GetMessageStatus request to the web service
using HTTP POST.
<form
action="http://cmp.robi.com.bd/WS/CMPWebService.asmx/GetMessag
eStatus" method="post">
<input type="text" name="Username" value="testuser" />
<input type="text" name="Password" value="XXXXXX" />
<input type="text" name="MessageId" value="22300" />
<input type="submit" value="Submit" />
</form>
bd.com.robi.cmp.ServiceClass ReturnValues =
service.GetMessageStatus("testuser", "XXXXXX", 22300);
if(ReturnValues.Status == 1)
Console.WriteLine("Message transmitted successfully!");
else
Console.WriteLine("Message transmission failed");