OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"
info@ozekisms.com
Tel.: 00 36 52 532 731
Overview Quick start Download Manual How to buy FAQ Contact Us
OZEKI NG SMS Gateway - Product Guide

Cpp SMS API Contents | SearchJava database sms example

Home > Product Manual > Developers Guide > Java SMS API

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  User Guide
  Developers Guide
  Tutorials
  ASP SMS API
  PHP SMS API
  HTTP SMS API
  SQL SMS API
  C Sharp SMS API
  AJAX SMS API
  Delphi SMS API
  Cpp SMS API
  Java SMS API
  Java database sms example
  Java HTTP sms example
  Java SMS SDK
  VB.NET SMS API
  Python SMS API
  Perl SMS API
  TCL/TK SMS API
  Coldfusion SMS API
  VB 6 SMS API
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
 


Automated phone calls?
Ozeki Phone System XE VoIP PBX software is an advanced PBX built for automated voice calls and 2 way SMS messaging. It has outstanding APIs for software developers. It can be used for:

Phone calls from SQL
Phone calls from HTTP
Voice and SMS applications

Callcenter developers
If you are working on telephone solutions, please check out the Ozeki VoIP SIP SDK.
It can be used to create VoIP client and server software.

Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

Example on how to send/receive SMS in Java


On this site you will find examples on how to send and receive SMS in Java programming language. This site was designed and created to help you pick the most suitable method of your preference. This information helps you create the SMS solution in JAVA on the server side. If you would like to use JAVA on mobile phones (e.g. J2ME SMS communication), you will find the document about SMS application port numbers useful.

Introduction

Java is one of the most popular programming language today. It offers many possibilities to develop applications and to build various solutions, but in order to be able to send and receive SMS messages, its possibilities need to be extended. If you are a Java developer and you would like to communicate with mobile users by sending SMS messages to their mobile phones, you need to find a way to communicate with the mobile network. The best way to do this is to operate your own SMS gateway. After you have setup an SMS gateway (for example the Ozeki NG SMS Gateway) in your network, all you have to do is find an appropriate interface to this gateway. In the following part, you can read about the best interfaces available for SMS messaging.

Sending SMS from Java using a database

If you are looking for a solution which assures accuracy, safety and high efficiency, probably the Java database solution will be your best choice. This solution uses a database server, (such as Oracle, MySQL, Java DB, MS SQL, etc) to send and receive SMS messages. We recommend you to use this solution if your Java application already uses a database for storing information.


Figure 1 - How to send and receive SMS messages from Java through SQL

The diagram above illustrates how this solution works. When you want to send an SMS it should be stored in a database table. The SMS gateway installed in your network will periodically check this database table and if it finds any unsent records, it will submit them and after submission it will update the status field of the record. This way your Java application will know if the message was sent or not. Receiving works a similar way. When an SMS comes in, it is stored in a database table. Your JAVA application can read this database table to find new incoming messages.

Read more: How to send SMS from Java through an SMS gateway using SQL

Sending SMS from JAVA using HTTP

This configuration is beneficial for those Java developers who prefer to use HTTP requests in their systems to submit SMS messages. As Java has built in functionality for HTTP, this is a very simple and efficient solution to post messages to the mobile network. HTTP submissions can go through plain an encrypted (HTTPS) connections, thus this solution not only gives you high performance, but can also be used to achieve greater security. If you operate your own SMS gateway, and you pass your messages to it using HTTP requests, SMS messages can be sent and received swiftly to mobile users (Figure 2).

Figure 2 - How to send text messages to cellphones from Java.

If you examine the above figure, you can see that in this configuration, the SMS messages are sent directly to the SMS gateway from the Java program using HTTP requests. If an incoming SMS comes in your Java application can receive it in two ways. It can poll the SMS gateway periodically to check for incoming messages, or if it as able to receive incoming HTTP requests, the SMS gateway can post incoming messages to it through HTTP.

Read more: How to send and receive SMS messages using HTTP request in JAVA

Sending SMS From Java using the Ozeki Java SMS SDK

The best option to send and receive SMS messages form Java is to use the Ozeki Java SMS SDK. This SDK gives you a library that communicates with the SMS Gateway through a TCP/IP socket. It is excellent because it is very fast, efficient and it provides asynchronous event handling to notify you about delivery information and incoming messages.



Figure 3 - Send/receive SMS in Java through the Ozeki Java SDK

Figure 3 gives a little insight on how this SDK works. SMS messages are channeled through a TCP connection directly to the Ozeki NG SMS Gateway. The SMS gateway forwards the messages directly to the mobile network and it uses the established TCP channel to return delivery reports to the Java program. The Java program can work with these reports by implementing the events triggered in the SDK.

Read more: How to send and receive SMS messages using the Ozeki Java SDK.

Dig deeper!
People who read this also read...






Next page: Java database sms example
Copyright © 2000 - 2014 Ozeki Informatics Ltd.
All rights reserved

Software PBX for Windows | VoIP SDK   |   Legal information   |   Privacy policy   |   Terms of use
Please, address your inquiries to info@ozekisms.com