- Products
- Ozeki 10
- SMS
- Ozeki 10 SMS gateway
- Ozeki NG SMS Gateway
- SMS protocol converters
- SMS router
- Message Server 6
- On-line manual
- Introduction
- SMS technology
- MMS technology
- About
- Product features
- Installation guide
- User guide
- Developers guide
- General information
- Languages
- C++ SMS
- SQL SMS
- HTTP SMS
- Files SMS
- Java SMS
- Port numbers
- PHP SMS
- ASP SMS
- Delphi SMS
- C# SMS
- Access SMS
- SMS FAQ
- Case studies
- Appendix
- Download
- Home
- Support
- How to buy
- SMS Wall
- IP SMS Gateway
- Android SMS
- Excel SMS
- Bulk Messenger
- Cluster Software
- Developer tools
- Robots
- Hardware
- Technology
![]() |
On-line manual: |
Explore all the features in this On-line HTML documentation of Ozeki Message Server 6.
| |
![]() |
Product guide: |
Download Ozeki Message Server 6 Manual in PDF format. This PDF guide explains all the features of Ozeki Message Server 6. |
SMS API for JAVA developers
The following example gives you detailed instructions on how you can send a WAP Push SMS messages from Java. The example uses HTTP Client functionality to pass the outgoing messages to the built in HTTP server of Ozeki Message Server. In the example we assume, that Ozeki Message Server is already installed and configured. A WAP push message contains a description of a WAP page and an URL that points to it.
Ozeki Message server can also be used to send text messages and various binary SMSes such as vCard and vCalendar messages, Operator Logos and Ringtones. All you have to do is change the messageType field and the message content in this example. A list of supported message types can be found on the following URL: http://www.ozeki.hu/index.php?owpn=488.
To send a WAP push message we use the HTTP client
library of Apache.org. First you need to download this
library:
Step 1. - download the apache HTTP client
library
Go to the following webpage:
http://apache.mirrors.crysys.hit.bme.hu/dist/httpcomponents/commons-httpclient/binary/commons-httpclient-3.1.zip,
and download version 3.1.
After you have downloaded the file
(commons-httpclient-3.1-src.zip) unzip it! The unzip will create the following
jar file, that contains the HTTP client utilities:
commons-httpclient-3.1.jar
Setp 2 - set the CLASSPATH to have
access to the functions stored in this jar.
SET
CLASSPATH=C:/tmp/commons-httpclient-3.1/commons-httpclient-3.1.jar
Step
3 - create a .java source file, that will connect to Ozeki Message Server and
will post a message.
PostExample.java
import org.apache.commons.httpclient.*; public class PostExample { // Configure the form parameters // Execute the POST method |
Step 4 - compile
the file
javac PostExample.java
Step 5 -
send the WAP push message
java
PostExample.java