Hi
I created a servlet that should function as a jersey client. But there seems
to be problems with readers when using the Servlet. The same client call
works in my JSF bean, but when I put it in a separate servlet it doesnt
work. This is the client call:
if (client == null) {
client = Client.create();
}
MultivaluedMap queryParams = new MultivaluedMapImpl();
queryParams.add("lang", lang);
wr = client.resource(PermitUtil.getPermitBackendUrl("") +
"/allPermitsViews");
permitList = wr.queryParams(queryParams).get(new GenericType>()
{
});
and the error message is:
com.sun.jersey.api.client.ClientHandlerException: A message body reader for
Java type, interface java.util.List, and MIME media type, application/xml,
was not found
at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:255)
at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:237)
at
com.sun.jersey.api.client.WebResource.handle(WebResource.java:572)
at com.sun.jersey.api.client.WebResource.get(WebResource.java:183)
Thanks
/Andreas
--
View this message in context: http://n2.nabble.com/Jersey-client-in-Servlet-tp4227006p4227006.html
Sent from the Jersey mailing list archive at Nabble.com.