This framework is used by me in my rest api xpage apps. Feel free to try it