|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.spedmo.sms.SpedmoMessageService
public class SpedmoMessageService
Spedmo (http://www.spedmo.com) Java SMS service. Connects to the Spedmo using web services (SOAP) to
send sms messages.
Simple to use... be sure to have an internet connection and write some code a bit like this
SpedmoMessageService messageService = new SpedmoMessageService();
messageService.setUsername("spedmo");
messageService.setSoapCode("1234");
messageService.createSms("61401234567", "Message #1"); // Create a SMS to send
messageService.createSms("61401234567", "Message #2"); // Make another one
messageService.createSms(....); // etc.
messageService.send("61401234567"); // Send the SMS's from this number via Internet
| Constructor Summary | |
|---|---|
SpedmoMessageService()
Spedmo Message Service Constructor |
|
SpedmoMessageService(String username,
String soapCode)
Spedmo Message Service Constructor |
|
| Method Summary | |
|---|---|
void |
createSms(String number,
String text)
Create a sms message and add it to the queue. |
Integer |
getReturnCode()
Return the code from the server. |
String |
getReturnCodeDefinition()
Return the code definition. |
void |
send(String fromNumber)
Service connector. |
void |
setSoapCode(String soapCode)
Set the soap code for the connection |
void |
setUsername(String username)
Set the username for the connection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpedmoMessageService(String username,
String soapCode)
username - Spedmo username - This is the same username which you use to log into http://www.spedmo.comsoapCode - Spedmo soap code - This can be obtained by visiting http://www.spedmo.com and signing up for a mobile account.public SpedmoMessageService()
| Method Detail |
|---|
public void setUsername(String username)
username - Your Spedmo username. This is the same username which you use to log into http://www.spedmo.compublic void setSoapCode(String soapCode)
soapCode - Your soap code. This can be obtained by visiting http://www.spedmo.com and signing up for a mobile account.
public void createSms(String number,
String text)
throws SpedmoException
number - The mobile (cell) number which will be the recipient. Numbers
should be a string of digits only. +61-41-123-4567 should be
represented at "61411234567" for example.text - The text of the sms. 160 characters per sms.
SpedmoException - Thrown in the event that an error occurs.
public void send(String fromNumber)
throws SpedmoException
fromNumber - The mobile (cell) number which will be the sender. Numbers
should be a string of digits only. +61-41-123-4567 should be
represented at "61411234567" for example.
SpedmoException - Thrown in the event that an error has occured.public String getReturnCodeDefinition()
public Integer getReturnCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||