Artem Moskalev
Artem Moskalev

Reputation: 5818

Connecting Android and java EE server

I am making a game. The client runs in android. It is multiplayer and I want to check as much logic as possible on the server. I am interested how to connect the android client to the pure-java backend. I dont want to deal with the pure sockets as long as it creates a lot of programming overhead. Something like EJB would be perfect, but as long as can see, there is no rmi package in Android or anything. So the only way is connecting it throught Sockets or URL-objects to the REST-service (Could connect with URL to SOAP-based service - but its too complicated to do by hand). Serialization does not work between android and java. What is the best way to connect an Android app in a multiplayer game to the server (better java EE EJB`s or something)? Is there a way except pure XML?

Upvotes: 2

Views: 1026

Answers (1)

Pradeep Pati
Pradeep Pati

Reputation: 5919

You can use JAX-RS to build a RESTful Webservice, and you can use JSON as the payload. Jersey is a reference implementation, and is a good one. There is JSON support as well.

Upvotes: 2

Related Questions