Presentation is loading. Please wait.

Presentation is loading. Please wait.

MGW client API How to easily integrate messaging into your application.

Similar presentations


Presentation on theme: "MGW client API How to easily integrate messaging into your application."— Presentation transcript:

1 MGW client API How to easily integrate messaging into your application

2 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

3 MGW client API uses ParlayX web services as transport protocol. (www.parlay.org)www.parlay.org There are two libraries: Java MGW client API Microsoft.NET MGW client API (written in C#) Technologies & Standards

4 Download latest Java and Microsoft.NET libraries from here: https://support.tiskis.com/confluence/display/download Getting Started

5 Java requirements: Operating system: independent Java SDK version 1.4.x or version 1.5.x (http://java.sun.com)http://java.sun.com Apache Ant tool version 1.6.x (http://ant.apache.org)http://ant.apache.org Microsoft.NET requirements: Operating system: MS Windows 98, 2000, 2003, XP.NET framework Visual Studio.NET Compiling & Running The Samples

6 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

7 Programming Java programming Read the user guide document: docs/UserGuide.html and follow the instructions Get 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); }

8 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; }

9 MGW Client API Thank you for your attention


Download ppt "MGW client API How to easily integrate messaging into your application."

Similar presentations


Ads by Google