Results 1 to 3 of 3

Thread: 406 Not Acceptable----415 Unsupported Media Type

  1. #1
    Join Date
    Jun 2012
    Posts
    2

    Angry 406 Not Acceptable----415 Unsupported Media Type

    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...

  2. #2

    Default

    i am facing the same problem.........can u tell me the solution

  3. #3
    Join Date
    May 2012
    Posts
    10

    Default

    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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •