Q:

Android and Tomcat communication?

I'm writing an android application that will rely heavily on a tomcat server. Before I go to far I wanted to get some advice on how to setup the communication. There will be a wide range of requests for data sent by the application. What is the best method to implement this. Is it to serialize objects or is there a better way? A link to a good tutorial would be really appreciated. 

A:

I solve this in my applications in the following way:
First, I use a RestWebService (i.e., JAXRS reference implementation). This is the communication endpoint on the Tomcat Server. 
Then the exchanging of messages can be done by using JSON Strings. They are well supported by Android and also JAXRS in combination with JACKSON allows to easily transform objects into JSON or to deserialize them. I usually write a JSON Object Library which contains all objects that should be available on both sides and include this Lib in both projects. 

