This document describes a scenario in which an online garden supply retailer uses Web services to perform an inventory search of several wholesale suppliers.
In the static inquiry on suppliers scenario, the Plants by WebSphere IT staff establishes connections with each supplier separately, and makes changes as suppliers come and go. It would be convenient to query multiple suppliers at the same time, without providing a list of particular suppliers to query. Furthermore, Plants by WebSphere managers would like to be able to shop around quickly according to criteria, such as the lowest wholesale price or fastest availability.
In this scenario, several plant and garden suppliers have published Web services to a Universal Description, Discovery, and Integration. (UDDI) registry. Suppliers create inventory Web services that use a standard interface. They publish their Web services to the centralized registry. Perhaps the registry has been established by the Plant Wholesalers Association. Or maybe a small Internet company established the buyer-seller site after finding that suppliers and retailers each would pay a small monthly rate for the convenience of the service.
In this way, they notify inquiring retailers, such as Plants by WebSphere, that their inventories are available to check.
The application powering the Web site checks the Plants by WebSphere inventory database. It discovers that the item is not in stock.
Plants by WebSphere can invoke a Web service that queries the UDDI registry for suppliers and the Web service at the site of each supplier is invoked. The administrator is presented with a list of suppliers from which the requested item is available, including the price and availability data.
The application invokes a Web services for J2EE client or a JAX-RPC client that communicates with a SOAP server at the supplier site to ascertain whether the supplier has the item in stock. The supplier data is sent to Plants by WebSphere.
If the supplier indicates that the item is in stock, the application powering Plants by WebSphere determines whether to order the item on behalf of the customer. The exchange of data can include checking a price threshold above which Plants by WebSphere does not order the wholesale item. It could also include decision-making information such as how long the supplier requires to deliver the item, or a date that the manufacturer plans to discontinue the item.
If the supplier can be consulted quickly enough, Plants by WebSphere does not have to bother its customer with concerns about availability. It confirms that the item is available, as though the item is in stock at Plants by WebSphere. If the supplier inventory temporary lacks the item, or Plants by WebSphere opted not to order the item from the supplier, Plants by WebSphere issues an appropriate response to the customer.
By publishing their Web services to UDDI, suppliers make them available for Plants by WebSphere and other retailers to discover and reuse. This saves development time, effort and cost, and helps minimize the need to maintain several different implementations of the same application at Plants by WebSphere and various other retailers who need to contact the suppliers for inventory data.
Particular editions of WebSphere Application Server provide a private UDDI registry that can be used in an intranet environment.