RESTful API in Java