How to communicate to/from gateway to stand alone server?( Newbie,pls help)
Hi all,
Im writing an app that will contact a specified gateway and retrieve info onto our server and perform manipulations on it then return the result back to the gateway for further operations...
But I'm a newbie and dont have much of an experience in network programming...
Would like to know what are the paramaters necessary to contact the gateway...(I've got permission to use a gateway from a certain provider.)
Could anyone please help me...(This is the last bit in my project , that im not too familiar with)
Regards
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
What exactly do you mean when you say gateway?
What protocol is the server and the gateway using to talk to each other?
// Json
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
The protocol is probably going to be HTTPS...
We have a choice to choose between that and HTTP... working out the logistics as of now..
But generally speaking can you give me pointers on how to hook onto the gateway?
This is however the overview...
The gateway will be pushing text to our server, we maintain a DB to do the manipulations on the incoming text.
Process depending on our needs and then push the result back to the gateway which will then take it forward.
I'll be using Java ...
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
It would be fairly straight forward then I guess, the server needs to have a servlet which accepts requests and then just prints back an answer to the gateway. Think of it as the gateway is the web browser and the server is just a normal web server.
You go to a url and you see a result. Thats what the gateway will need to do.
// Json
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
So in that case, there is very little of network programming that I'll be doing in java is it (meaning no scripts like the client side /sever side are necessary?)
can just use servlets to do the job?
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)urgent
wanted to know this as well..
The gateway that will send the data to us will be in the form of an url, this will be processed by our server(Which will act as a client since the gateway now acts as server).
So should i be looking at writing a HTTP client app or servlets, because regular socket programming ,Im assuming will only be used for RAW TCP/IP packets..
Could you shed some light on this ...Its pretty urgent.
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
Well basically, no matter which one is the client server it still works the same, you need to figure out from what machine in your system you want the request to come from (firewall issues etc). Once you've figured this out, this is how it works.
I will call these client and server.
The client sends an http request off.
And then in the server you will have some code that gets the requestdata parameter and processes it using whatever internal logic you have.
Then the server needs to print a response (a webpage basically) with whatever you want to send back, this could be an XML or just a simple text string.
Quote:
Woohoo, the request was processed successfully!
The client then parses the response and does whatever it needs to do.
DONE!
Thats about it. Hope that helps :)
// Json
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
Thanks,
indeed the logic helped me to understand quite a bit.
Re: How to communicate to/from gateway to stand alone server?( Newbie,pls help)
We tend to use Apache HTTP components for a lot of this stuff at work.
HttpComponents - HttpComponents Overview
// Json