Hi Kent,
Thanks for your response...I had tried previously with produces ="application/json" and it didnt work. Also now i tried with
Still am getting 406. Also I would like to tell you one more observation that we have made. The moment when I change the return type from an Object to a String, it works....Code:@RequestMapping(method = RequestMethod.GET, value = { WebApplicationConstants.SWITCH_USER_URL },produces = "application/json;charset=UTF-8")
Code:Existing: public @ResponseBody CustomResponse switchUser( @RequestParam(WebApplicationConstants.SESSION_TOKE N) String gsxSessionToken, @RequestParam(WebApplicationConstants.SWITCH_FLAG) String switchFlag, HttpServletRequest request, HttpServletResponse response, Return Type: return new CustomResponse(jsonObject.toString()); New: ) public @ResponseBody String switchUser( @RequestParam(WebApplicationConstants.SESSION_TOKE N) String gsxSessionToken, @RequestParam(WebApplicationConstants.SWITCH_FLAG) String switchFlag, HttpServletRequest request, HttpServletResponse response, Return Type: return (jsonObject.toString());
But this involves changes across application and is not a recommended solution that we are looking for. Could you please let us know how we can tackle this error?


Reply With Quote
