Hi,
I'm trying to call a REST webservice using Jersey 1.6-SNAPSHOT.
When calling, my application raised an exception:
GRAVE: A message body reader for Java class
fr.canalplus.yoda.commons.service.ServiceResponse, and Java type class
fr.canalplus.yoda.commons.service.ServiceResponse, and MIME media type
text/html;charset=UTF-8 was not found
18 janv. 2011 17:00:02 com.sun.jersey.api.client.ClientResponse
getEntity
GRAVE: The registered message body readers compatible with the MIME
media type are:
*/* ->
com.sun.jersey.core.impl.provider.entity.FormProvider
com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider
com.sun.jersey.core.impl.provider.entity.StringProvider
com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
com.sun.jersey.core.impl.provider.entity.FileProvider
com.sun.jersey.core.impl.provider.entity.InputStreamProvider
com.sun.jersey.core.impl.provider.entity.DataSourceProvider
com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.ReaderProvider
com.sun.jersey.core.impl.provider.entity.DocumentProvider
com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceRead
er
com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader
com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General
com.sun.jersey.core.impl.provider.entity.EntityHolderReader
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
I do my call in war, and everything seems ok in my WEB-INF/lib :
Jersey core and client libraries, Jaxb API and Impl libraries are
present
Here is my implementation :
URI uri = UriBuilder.fromUri(url).port(port).build();
WebResource web = Client.create().resource(uri);
web.path("/").type(MediaType.APPLICATION_FORM_URLENCODED).post(ServiceRe
sponse.class, form);
Do you have any idea of the cause of problem?
Thanks,
Matthieu