mgw client api how to easily integrate messaging into your application
TRANSCRIPT
MGW client API
How to easily integrate messaging into your application
Transport (sending/receiving) of:
• SMS messages• MMS messages• binary SMS messages (e.g. WAP Push service indication)• LBS messages (location based services)
MGW Client API Offers
MGW client API uses ParlayX web services as transport protocol.(www.parlay.org)
There are two libraries:
• Java MGW client API• Microsoft .NET MGW client API (written in C#)
Technologies & Standards
Download latest Java and Microsoft .NET libraries from here:
https://support.tiskis.com/confluence/display/download
Getting Started
Java requirements:
• Operating system: independent• Java SDK version 1.4.x or version 1.5.x (http://java.sun.com)• Apache Ant tool version 1.6.x (http://ant.apache.org)
Microsoft .NET requirements:
• Operating system: MS Windows 98, 2000, 2003, XP• .NET framework• Visual Studio .NET
Compiling & Running The Samples
Compiling & Running The Samples
Java sample: sms-test
• Unzip mgw-client-x.x.x.zip to a working directory
• Using command line, browse to samples/sms-test
• Read the file: readme.txt to get some quick info about the sample
• Open conf.properties file and adjust the configuration parameters properly
• To compile the sample type 'ant compile' and press ENTER
• To run the sample type 'ant run' and press ENTER
• You'll be prompted to enter a message text and an MSISDN to send to
Programming
Java programming
Read the user guide document: docs/UserGuide.html and follow the instructionsGet yourself in common with the API, read the JavaDoc: docs/api/index.html
/*** Creates an SMS message using the given parameters* and send it to the given recipient's MSISDN*/public void send(String text, String recipient)throws Exception{
Message message = new SmsMessage(text);messageManager.sendMessage("none", message, originator, new String[]
{recipient}, Priority.DEFAULT, null);}
Programming
Java programming
Make some initialization on the application startup/**
* Instantiates and initializes all needed service objects and parameters* which MGW client library uses to send messages.*/public void init(String confFilePath)throws FileNotFoundException, IOException{
Properties conf = new Properties();conf.load(new FileInputStream(confFilePath));
originator = conf.getProperty("originator");SingleRouteCredentialsHandlerImpl credentialsHandler = new
SingleRouteCredentialsHandlerImpl();credentialsHandler.setUsername(conf.getProperty("userName"));credentialsHandler.setPassword(conf.getProperty("userPassword"));
//messageManager is preferable to be a singleton instance in your business application.
MessageManagerImpl mm = new MessageManagerImpl();mm.setSendMessagePortURL(conf.getProperty("sendMessagePortURL"));mm.setRouteCredentialsHandler(credentialsHandler);messageManager = mm;
}
MGW Client API
Thank you for your attention