If you have a large XML (thousands of rows) Response from a Spring Web Service, how is the best way to implement paging or is paging the best way to approach this issue? The pipe between the client and service only allows so much data so we need to handle this situation somehow.
Should there be some unique ID sent from the client with the Request and follow up Requests (incremented somehow) so you know which chunk of Response data to send back in subsequent Requests?
Just wondering how this should best be done..
Thanks in advance for any suggestions.
Bear Bibeault wrote:I frequently send 4 items of metadata with each request/response that could be paged:
the property (column) to sort on the sort order the page size the page number
Good to hear from you.
But, what about a "requesterId" or something so you could keep all the paging progress in sync for the various Requesting clients?
And these metadata values would have to be attributes or elements in the Request method's XSD definition, right (Spring WS: XSD only)?
Bear Bibeault wrote:Any other filters are outside the scope of this metadata.
And sorry, I have no idea about the XML. I work exclusively with JSON.
In any case, it seems that we'd just accept the information about how many rows to send back (and possibly some of your other metadata) in the Request and then do the SQL for that Response. I was thinking that the entire request would be cached on the server and need to coordinate future requests with multiple clients, but that doesn't make sense with hundreds of potential simultaneous clients.
Appreciate your reply.