Forum Stats

  • 3,840,313 Users
  • 2,262,585 Discussions
  • 7,901,213 Comments

Discussions

How to reply to a message using Message Board REST API

969976
969976 Member Posts: 1
edited Jul 15, 2013 12:27PM in Web Space Server
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

Answers

This discussion has been closed.