0 Replies Latest reply: Aug 5, 2012 7:52 PM by prm2612 RSS

    REST GET URL: Failed to unmarshal input "UnmarshalException"

    prm2612
      Whenever I am trying to access a REST API of OCSG where JSON data is expected in request URL (e.g. Get Session Remaining Lifetime, Destroy Session, Get Profile etc.), I get the following error:

      {"error":{"message":"Failed to unmarshal input:A JSONObject text must begin with '{' at character 0","type":"com.bea.wlcp.wlng.rest.bind.UnmarshalException"}}

      I have added following request headers while sending REST request to OCSG:
      1. Content-Type: application/json
      2. Authorization: Basic base64EncodedString
      3. X-Session-ID: app:+sessionId+

      Few of the tens of URL examples I tried for "Get Session Remaining Lifetime":
      rest/session_manager/session/app:5222896751740427892
      rest/session_manager/session/{app:5222896751740427892}
      rest/session_manager/session/{"app:5222896751740427892"}
      rest/session_manager/session/{"sessionId":"app:5222896751740427892"}
      rest/session_manager/session/${app:5222896751740427892}
      rest/session_manager/session/${"app:5222896751740427892"}
      rest/session_manager/session/${"sessionId":"app:5222896751740427892"}

      But all of these result in the same error as mentioned above.

      Will appreciate if someone can tell me what am I doing wrong.

      Edited by: prm2612 on Aug 5, 2012 5:52 PM