my solution for /getmessages/{id} done in restlet