Java restful service API for Word Counter