Hi All,
I have sadly been stuck for 10 hours with a problem... I am sure the solution will eventually be the equivalent to telling me I need to put the key into the ignition and turn it in order to start the motor...
At wits end, I must suck it up and expose myself :-)
I have
Tomcat 7 and installed Jersey 1.11.
I am calling my webservice from an Android app using the apache HttpPost class. I am trying to use either text/plain or application/json to pass the information to the server... I do not have that code with me right now or i would post it - but I have tried about 20 different iterations of that code from snippets found on the net. I really think the problem isn't there but is rather on my web app...
When I execute the HttpPost, I get a 415 error and the Tomcat server throws the following:
Jan 17, 2012 12:01:34 AM com.sun.jersey.spi.container.ContainerRequest getEntity
SEVERE: A message body reader for
Java class java.lang.Object, and
Java type class java.lang.Object, and MIME media type
application/json was not found.
The registered message body readers compatible with the MIME media type are:
application/json ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$App
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$App
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
*/* ->
com.sun.jersey.core.impl.provider.entity.FormProvider
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$StreamSourceReader
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.json.impl.provider.entity.JSONArrayProvider$General
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$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
com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
I have somehow, somewhere, failed to tell the server how to receive this type of message. Can someone please push me in the right direction?
Thank you VERY much