integration of communication with rest server.

removed hard coded json string.