Implementing WSRP Protocol Scenario

This scenario depicts interactions between two companies: Oracle America (a WSRP producer), and Kane Consulting (a WSRP consumer).

In this scenario, Kane Consulting is an online company providing personalized financial services to clients by subscription. Oracle America wants to host a number of financial applications, including a web-based inventory planning application. Kane Consulting wants to offer this application to its clients via its web pages.

Without WSRP, to offer the inventory planning application to clients, Oracle America and Kane Consulting must agree on the following procedure:

  1. Oracle America makes the metadata of the inventory planning application available to Kane Consulting. Kane Consulting uses this metadata to create a page that clients can use to manage their plans.

  2. A client visits Kane Consulting's web site and clicks a link to the inventory planning application.

  3. Kane Consulting then transmits a request to Oracle America to obtain the initial view of the application. Oracle America responds by returning HTML markup that represents the first page of the application.

  4. Kane Consulting processes the returned markup and prepares it for conversion. If the returned markup has links, Kane Consulting transforms the markup so that when the links are activated, they return to the Kane Consulting web site.

  5. Kane Consulting converts the markup into a web page, writes it into the response of the browser's connection, and transmits the page to the client's browser.

  6. The client reviews the page and finds a form to submit a new vendor ID. The client then enters the ID number and other details and submits the entry.

  7. Kane Consulting receives the request containing the new data. Upon determining that the request is for the inventory planning application, Kane Consulting transmits another request to Oracle America to process the client transaction.

  8. Oracle America processes the transaction, adds the vendor ID to the clients plan, and returns a new state for the plan.

  9. Kane Consulting then sends a request to get the changed markup based on the current state of the plan. Oracle America generates the markup and returns it to Kane Consulting.

  10. Kane Consulting then repeats steps 4 and 5.

  11. The client receives a new page containing the updated plan.

Instead of developing a protocol to achieve the preceding procedure, Oracle America and Kane Consulting can use WSRP as the protocol. Oracle America is a WSRP producer offering portlets, and Kane Consulting is a WSRP consumer consuming portlets and aggregating portlets for clients to access aggregated portlet pages. The inventory planning application is a portlet offered by the WSRP producer.

To implement the preceding procedure, Oracle America and Kane Consulting use WSRP to define various interactions, with Oracle America implementing the following required WSRP interfaces and operations.

Service Description Interface: Provides metadata of itself and the list of portlets it offers. Kane Consulting invokes the getServiceDescription operation of this interface to obtain this metadata step 1 of the procedure).

Markup Interface: To generate markup and to process requests, Oracle America implements the markup interface specified by WSRP. Kane Consulting, invokes the getMarkup operation to obtain the portlet's markup (steps 3 and 9), and invokes performBlockingInteraction to generate the client's interactions to Oracle America (Step 7).

By implementing the preceding interfaces and agreeing to conform to WSRP, both Oracle America and Kane Consulting can use a standard process to offer and consume portlets. In addition, Oracle America can offer the same portlets to company X as long as company X adheres to WSRP, and Kane Consulting can consume additional portlets offered by company Y provided that company Y also implements WSRP interfaces.