You could try to use Jersey RESTFul Services library.
For example on your server you could have some code like this:
@Path("/your_class")
public class YourClass {
[...]
@POST
@Path("/your_method")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.APPLICATION_JSON)
public ArrayList<Object> yourMethod(String input){
[...]
return new ArrayList<Object>();
}
}
And on the client side you could have some code like this:
[...]
ServiceFinder.setIteratorProvider(new AndroidServiceIteratorProvider());
ClientConfig clientConfig = new DefaultClientConfig();
clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
clientConfig.getClasses().add(JacksonJsonProvider.class);
Client client = Client.create(clientConfig);
WebResource webResource = client.resource("http://yoursite.net:8080/NameOfService/rest/your_class/your_method");
ClientResponse response = webResource.accept("application/json").post(ClientResponse.class,"your input");
ArrayList<Object> list = response.getEntity(new GenericType<ArrayList<Object>>() {});
[...]
Also this is a good tutorial to help you with Jersey and its libraries.