Converted PredictionServlet to a web service