I am using a REST service on in an ordinary java project and it works as it should. What I want to do now is using the same service on an Android app (and getting the same result ofc)\[code\]response = mWebResource.path("/test").accept("application/xml").get(ClientResponse.class);status = response.getStatus();if (status == 200 ) { TestBean jbl = response.getEntity(TestBean.class); System.out.println(jbl);}\[/code\]On the server side it looks something like this\[code\]import javax.ws.rs.GET;import javax.ws.rs.Path;import javax.ws.rs.Produces;import javax.ws.rs.core.Context;import javax.ws.rs.core.HttpHeaders;import javax.ws.rs.core.UriInfo;@GET@Path("/test")@Produces("application/xml")public TestBean getGetTest(@Context HttpHeaders headers) { try { TestBean bean = new TestBean(); return bean; } catch (Exception e) { } return new TestBean();}\[/code\]The result here is the TestBean class instance when I use it in an ordinary java application, how do I get the TestBean in android. I only succeed in getting an XML stream. My android test code so far looks like this. The key here seemes to be that the response.getEntity call cant take a class argument.\[code\]HttpClient client = new DefaultHttpClient();BasicHttpContext localContext = new BasicHttpContext();BasicScheme basicAuth = new BasicScheme();HttpHost targetHost = new HttpHost("192.168.100.114", 80, "http");HttpGet httpget = new HttpGet("http://192.168.100.114/RestWeb/test");HttpResponse response = client.execute(targetHost, httpget);HttpEntity entity = response.getEntity();Object content = EntityUtils.toString(entity);System.out.println(content);\[/code\]