web services - client server communication in Java -



web services - client server communication in Java -

i trying set webserver on old machine of mine. have installed ubuntu server edition , aim utilize following:

i want run java programme on server. want able retrieve info programme computer/phone using net connection. want able give programme data, , response saying whether or not info has been received correctly.

so example:

a .jar programme runs on server , holds variable x i want able query value of x device (over internet). i want able set value of x remotely device, , response saying successful in altering value.

what options here? seek , maintain things simple. perhaps worth mentioning 1 using system. server used exclusively dealing 2 requests outline above.

is case of creating java programme listens out incoming requests , running on server?

as mentioned, can start custom serversocket wrapper decode incoming requests , it's bid. currently, whole frameworks done encapsulate mutual code of task -- see 3rd point. old-school java solution: utilize rmi. see rmi tutorial. new-school java solution: devise simple text-based protocol 2 commands: read() set(newval) implement protocol on new trendy java framework, apache mina, created facilitate quick development of network apps in java.

i, personally, started rmi such kind of tasks. since rmi considered core java technology, it's wise larn it.

java web-services http

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -