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 necessarily even 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 a "dynamic inquiry on suppliers" 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.
How out of stock items are handled
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. Then in turn, 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, perhaps including price and availability data.
The application invokes a Web services for J2EE client or 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 will not order the wholesale item. It could also include decision-making information such as how long the supplier will require to deliver the item, or a date on which 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 simply 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 will issue an appropriate response to the customer.
Web services technologies used in this scenario
This scenario uses the following Web services technologies.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.
Related concepts
Overview: Online garden retailer Web services scenarios
Web services scenario: Static inquiry on supplier
Web services scenario: Cross supplier inquiry
Related tasks
Implementing Web services applications
Using the UDDI Registry
Related information
Samples page on IBM
site