Restful web service to generate prime numbers up to a given value