Web services scenario: Dynamic inquiry on supplier

 

+

Search Tips   |   Advanced Search

 

Overview

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 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

The following events happen when a customer on the Plants by WebSphere site orders an item that is not available according to the Plants by WebSphere inventory.

  1. In advance, the suppliers publish their Web services to a UDDI registry for such an occasion.

    In this way, they notify inquiring retailers, such as Plants by WebSphere, that their inventories are available to check.

  2. Plants by WebSphere checks its own inventory.

    The application powering the Web site checks the Plants by WebSphere inventory database. It discovers that the item is not in stock.

  3. Plants by WebSphere uses a UDDI4J client to consult the UDDI registry for suppliers whose inventories it can check.

    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.

  4. Plants by WebSphere uses the Web services to check the supplier inventories.

    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.

  5. Plants by WebSphere either obtains the out of stock item, or does not.

    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.

  6. Plants by WebSphere notifies its customer of the outcome, as soon as possible.

    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.

 

Web services technologies used in this scenario

This scenario uses the following Web services technologies.

XML (Extensible Markup Language)

XML is used to standardize the exchange of data between Plants by WebSphere and its supplier.

Web Services for J2EE

Web Services for J2EE, also known as JSR-109, defines how J2EE applications create and access Web services.

Java API for XML-based remote procedure call (JAX-RPC)

JAX-RPC, also known as JSR-101, defines how Java applications access Web services.

WSDL (Web Services Description Language)

WSDL is used to turn the existing application into a Web service, by acting as the interface between the underlying application and other Web-enabled applications.

SOAP

SOAP is the protocol by which the Web service communicates with the supplier over the Internet.

UDDI registry

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 WAS 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

Task overview: Implementing Web services applications
Use the UDDI registry

 

Related Reference

Specifications and API documentation

 

Related information

Samples page on IBM site