pass html request to java class
Hi.
I'm building an sms based jukebox for my sophomore project in computer science.
Things have been going well till now.
The basic project is this:
I have an sms gateway on the server side (pc). I'm using kannel open source sms gateway on cygwin. The pc is linked to a gsm mobile via a RS232 data cable. There is a media player (mp3) on the server side as well.
BASIC FUNCTIONALITY
A request sent by a user (using a gsm mobile) is receied by server via the gateway. Request is basically a predefined code for a song.
The gateway sends a html request to the server.
PROBLEM POINT
I cannot get the html request from the mobile gateway to be passed to the mp3 player.
PLEASE HELP?
Sincerely,
Ken
Not quite.
The music player is a stand-alone software. What I think I'm trying to do is write a servelet for servicing the http request sent by the gateway. This should be done by playing the requested song, or returning details of a playing song (by sms) to the client.
Forgive me if I confuse you. Java is new to me and its proving rather tricky.
Please help?
> Is it possible to have the servelets work on getting
> information from a database
Yes, it's pretty easy. You will need to learn how to use the Java DataBase Connection (JDBC) API, and you may want to learn how to use a DataSource to supply the connectivity.
> and foward to the sms
> gateway?
Assuming that the gateway translates web requests into SMS messages and vice-versa (there is no standard Java thing for doing this) then yes, it will be possible. How you do that's between you and the gateway vendor, though.
> I'd like for the system to be able to reply
> to user requests by sms.
If your gateway supports it, you can do it. Probably you want to create an HttpConnection object to aid you in this. But I recommend writing the incoming controls before you worry about the outgoing controls.