This discussion is archived
1 Reply Latest reply: Sep 4, 2012 2:36 PM by Chandresh RSS

Rest calls are getting 406 error with beta refresh

Chandresh Newbie
Currently Being Moderated
We are seeing that our REST API calls are getting http 406 error. We have not made any changes on the REST Service. In Console, i see following messages that might be related to this issue.

--------
8/31/12 9:33:23.259 PM TAOMobile: -JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=11 \"Unexpected end of string\" UserInfo=0xc0ab830 {NSLocalizedDescription=Unexpected end of string}"
)
8/31/12 9:33:23.265 PM TAOMobile: -JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=11 \"Unexpected end of string\" UserInfo=0xaec1590 {NSLocalizedDescription=Unexpected end of string}"
)
---------

Here is how we make the call.


RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
restServiceAdapter.clearRequestProperties();
restServiceAdapter.setConnectionName("TAORestWebService");
restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);
restServiceAdapter.addRequestProperty("Content-Type", "application/json");
restServiceAdapter.setRetryLimit(0);
restServiceAdapter.setRequestURI(argRequestURI);

String response = "";

// It's a GET request, so there's no payload
response = restServiceAdapter.send("");
System.out.println("Response from the server: " + response);

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points