Skip to content

smsglobal/smsglobal-java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMSGlobal Java Client

Requirements

  • JDK 7 or 8
  • Maven 3.x

How to build the jar

mvn clean package

Sending a message using the HTTP transport

Message message = new Message("SGTest", "614xxxxxx", "Sending a message using the HTTP transport");
HttpTransport httpTransport = new HttpTransport("xxxxxxxx", "xxxxxxx", "https://www.smsglobal.com/http-api.php");
System.out.println(httpTransport.buildUrl(message));
Client client = new Client(httpTransport);
String response = client.sendMessage(message);

Sending a message using the REST transport

Message message = new Message("SGTest", "614ccc", "Sending a message using the REST transport");
RestTransport restTransport = new RestTransport("aaa", "bbb", "https://api.smsglobal.com:443/v2");
restTransport.setPath("/sms/");
System.out.println(restTransport.getBaseUrl() + restTransport.getPath());
System.out.println(restTransport.toXml(message));
Client client = new Client(restTransport);
String response = client.sendMessage(message);
System.out.println(response);

About

A multi transport Java client for use with SMSGlobal services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages