How the client read Collection<Idm>()
1) On server side:
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Collection<Idm> serachIdms
and server side generate XML I can see it in TCP/IP monitor
2) On the client side I have problem
clientResponse = webResource
.path(path)
.queryParam("url", url)
.queryParam("description", description)
.accept(MediaType.APPLICATION_XML)
.get(ClientResponse.class);
result = (Collection<Idm>) clientResponse.getEntity(Collection.class);
Exception:
com.sun.jersey.api.client.ClientHandlerException: A message body reader
for Java class java.util.Collection, and Java type interface
java.util.Collection, and MIME media type application/xml was not found
at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:561)
at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:517)
Any idea what is wrong?
Regards, Tomaz