1 Reply Latest reply: Jul 15, 2013 11:27 AM by HarshaRamesh RSS

    How to reply to a message using Message Board REST API

    969976
      Hi ,


      I am trying to post a message using Message Board REST API by using the following code

      WebResource webResource1 = client.resource("http://10.87.252.224:8888/rest/api/messageBoards/person/9D4EC81016AF11E2BFD87F6A9A6468C0? utoken=FLCPT4FwvhO9D96olVu0XZyGYZ1k_w**");
      webResource1.addFilter(new HTTPBasicAuthFilter("xxxxxx","*******"));
      String sendbymessage="{\"body\":\"It is test message\"}";
      webResource1.type("application/json").post(sendbymessage);
      System.out.println("done");
      ===
      The problem is I am able to send a message to myself but when I am trying to post a message to another user , it is throwing a server side error

      Exception in thread "main" com.sun.jersey.api.client.UniformInterfaceException: POST http://10.87.252.224:8888/rest/api/messageBoards/person/9D4EC81016AF11E2BFD87F6A9A6468C0?utoken=FLCPT4FwvhO9D96olVu0XZyGYZ1k_w** returned a response status of 500 Internal Server Error



      Please give me some points to progress.



      Regards,

      Bhanu