Implementing jQuery AJAX calls to REST service