Home > AQL_sms_soap_api

AQL_sms_soap_api

AQL_sms_soap_api is a project mainly written in Java, it's free.

Client api for sending and receiving sms messages via the aql.com soap message web service api

############################ AQL sms soap api ############################

Overview

The is a thin java wrapper client api for the aql.com soap messaging api. It makes use of the Spring-ws and Castor packages to send and receive sms messages to and from the aql.com soap messaging web service.

Build

To build this project use Maven (http://apache.maven.org). Checkout the project to your local machine and from the command line run

mvn clean install

This will build and install the jaql_message.jar package into your local maven repository.

Usage

Use this package in your own Java applications as a simple way of accessing the aql.com sms soap api. The simplest way to implement it is with Spring (version 3)

In your own project maven build file add a dependecy to the jaql_message.jar like so -

com.aql.message jaql_message 1.0

Set up the aql inbound servlet by declaring it in your web.xml. This servlet will receive inbound messages and status update data from aql

AqlInboundServlet com.aql.message.mo.AqlInboundServlet 1 AqlInboundServlet /aql.jsp

Now import the jaql_message.xml application context into your own project's Spring application context file like so -

No create a client bean which will contain your aql.com api credentials, i.e. your own aql.com username and password. You also need to specify a call back url so aql.com can push sms status update data to your web application. Create the bean like so -

/aql.jsp?reportcode=%code&destinationnumber=%dest]]> your-aql-username your-aql-password

Now in your own code you can access the bean and send messages by creating an MTSmsMessage object and passing it into the sendMTMessage() method, like so -

MTSmsMessage mtMessage = new MTSmsMessage(); mtMessage.setDestinationArray(new String[] {"+44........"}); mtMessage.setMessage("Hello, this is a test message");

try { aqlSOAPClient.sendMTMessage(mtMessage);

} catch (AqlException e) { e.printStackTrace(); }

Contact [email protected] for further help :-)