Modified the Get Messages service so that it returns a JSON string.