Background information
Many web services expose inputs to control accessing a subset of a large data universe. Unfortunately, there is no standard in wide use dictating what argument names and/or types should be used to implement such paged access. Therefore, if you create IBM® WebSphere® Portlet Factory service providers that get data from such web services, you must write a small amount of custom code to expose these services in a paging-aware fashion.
Sample description
This sample shows how to build a paging-aware service provider model that gets data from a web service. It includes a custom data retriever implementation that calls a web service and passes it a start row index and count to retrieve a subset of a larger list of employee records.
The attached package includes three models, in the samples/paged_web_service folder:
- EmployeesWebServiceProvider - test model that implements a WebService so that the service provider can have something to call
- EmployeeServiceProvider - the service which demonstrates use of a custom data retriever to create the paging-aware service operation
- EmployeeServiceConsumer - basic consumer of this service
Here is a screenshot of the running sample consumer model:
Notes on running the sample and prerequisites
Import the attached zip file into your project using the Import WebSphere Portlet Factory Archive command.
Download
PagedWebServiceSample.zip