PDA

View Full Version : 406 Not Acceptable----415 Unsupported Media Type



zhuzizzb
Jun 8th, 2012, 04:46 AM
when i run the spring-android-showcase i can't get the json result, but i can get the xml result through restTemplate. anybody can help me?

my showcase version is SpringSource-spring-android-samples-v1.0.0.RC1-40-gfb81900.zip

there are the Excepions when i Fetch Json list of states:
HttpGetJsonActivity(459): 406 Not Acceptable
because i can get the xml result, so I think the config will not be wrong.
who can resolve it, thank you...

sharukhshazz2214
Sep 29th, 2012, 11:55 AM
i am facing the same problem.........can u tell me the solution

rwdownearth
Oct 1st, 2012, 07:08 PM
Apparently the ContentType / AcceptableMediaType in your request headers doesn't match the consumes/produces definition of your service.

Can you post both the definition of the service, and the invocation of the rest template?