Implementing REST methods for webservice