Consuming the REST service