Providing navigation buttons (prev, next, etc.) on the client side to page through a set of database records is a common task and one that I've had to implement numerous times for different customers. The current customer that I'm working for is using XML based transactions to access data and business logic through the middleware and requires only forward paging through the data. The implementation allows you to pass the maximum number of records you would like back and a cursor indicating what page you are on. The response passes back the actual number of records returned and the cursor to the next page of data.