Web services online garden retailer scenario: Cross supplier inquiry
This document describes a scenario in which an online garden supply retailer uses web services to integrate its inventory system with the inventory systems of other retailers. Also using web services, the main Internet storefront can check supplier inventories on behalf of itself or other retailers.
The marketers at Plants by WebSphere confirm with market data that people are likely to purchase plants and gardening supplies in tandem with purchases of other goods, such as gardening books. To increase the visibility of Plants by WebSphere, the company arranges with various other merchant sites to include Plants by WebSphere inventory as part of their own.
At one site, web services and other technologies are used to insert data about Plants by WebSphere items into web pages that match the look and feel of the rest of the site. When a customer orders a Plants by WebSphere item at a site other than Plants by WebSphere, the second site relies on the Plants by WebSphere inventory web service to make sure that the item is in stock, and to query suppliers as needed.
The second site does not have to implement its own web services to perform the same function as those developed by Plants by WebSphere. The second site might want to implement sophisticated function by creating its own web service.
Plants by WebSphere also supports JavaBeans endpoints within the web container and enterprise beans endpoints by taking advantage of the JAX-WS programming model support. Using JAX-WS makes it easy to configure and reuse configurations, so we can incorporate new web services profiles. And, the new standards support interoperable and reliable web services applications. The online retailer can send messages asynchronously, which means that the messages can communicate reliably even if one of the parties is temporarily offline, busy, or not available. By using these new technologies, the online retailer can be confident that its communication is reliable and reaches its destination while interoperating with other vendors.
How out of stock items are handled
The following events happen when a customer orders an item from one of the sites that re-sells items from Plants by WebSphere.
- In advance, Plants by WebSphere publishes its Web service to a public Universal Description, Discovery and Integration (UDDI) registry.
By publishing the web service, other retailers are made aware of the inventory web service available from Plants by WebSphere. In this scenario, Plants by WebSphere enables the web service to check its own inventory, as well as that of suppliers.
- The re-seller checks the Plants by WebSphere inventory.
The application powering the website checks the Plants by WebSphere inventory database. It discovers that the item is not in stock.
- The re-seller consults the UDDI registry for suppliers whose inventories it can check.
- The re-seller uses the web services to check the supplier inventories.
The application invokes a JAX-RPC SOAP client, or a JAX-WS SOAP 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 the reseller.
- The re-seller either obtains the out of stock item, or does not.
- The re-seller notifies its customer of the outcome, as soon as possible.
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.
- 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.
Public UDDI registries are run by a consortium named UDDI Operators Council, which includes IBM, NTT, SAP, and Microsoft.
Particular editions of WAS provide a private UDDI registry that can be used in an intranet environment.
- Web Services Invocation Framework (WSIF)
In addition to publishing SOAP/HTTP bindings to the public UDDI registry for use by other vendors, Plants by WebSphere might also have published to an internal private UDDI registry with additional optimized bindings. A web service provider such as Plants by WebSphere might offer a SOAP binding for the service and a local Java binding that enables us to treat the local service implementation or Java class as a web service. If the client is deployed in the same environment as the service, the local Java binding for the service can be used. This provides more efficient communication with the service by making direct Java calls rather than using the SOAP binding.
- Web services gateway
Plants by WebSphere could use a gateway to handle web service invocations between Internet and Intranet environments. A web services gateway makes the internal web service available externally. It takes care of these considerations:
- The transport mechanisms or channels on which messages can be carried to and from the service
- The filters, if any, that act upon these incoming and outgoing messages
- The UDDI registries, if any, to which to publish the service
- The levels of security to apply to the service
Related:
Secure web services Overview: Online garden retailer web services scenarios Web services online garden retailer scenario: Static inquiry on supplier Web services online garden retailer scenario: Dynamic inquiry on supplier Web Services Invocation Framework (WSIF) Overview of standards and programming models for web services message-level security Task overview: Implementing web services applications Use the UDDI registry Work with the web services gateway Web services specifications and APIs Samples page on IBM site