Databases Reference
In-Depth Information
The searchItems operation will take a searchItemsRequest element for input and
return a searchItemsResponse element. The searchItemsResponse has within it a
searchState element. This element is a sequence that has an unlimited number of
arbitrary elements. This can be used by the service to store sufficient state to allow
it to deliver the next 20 items in the response. It is important to realize that this state
does not have to be understood by the client of the service. The client of the service
just has to copy the searchState element to the continueSearchItemsRequest
element to retrieve the next set of 20 results.
The preceding approach has the advantage that the service may still be stateless,
although it gives the appearance of being stateful. The sample schema below could
be used to allow the service to resume the search where it left off without the need
for any internal state information in the service. By storing the state information (the
original request and the index of the next item to be returned) within the response,
the service can retrieve the next set of items without having to maintain any state
within itself. Obviously, the service for purposes of efficiency could maintain
some internal state, such as a database cursor, for a period of time, but this is
not necessary.
Search WWH ::




Custom Search