Get Product Availability

The GetProductAvailability outbound service interface is used to retrieve the availability of a product from an external system when the information is not cached by the local inventory cache.

 

Request

Request to this outbound service interface is in the form of a GetProductAvailability business object document (BOD). The definition of the GetProductAvailability BOD can be found in the XML schema file WC_eardir/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetProductAvailability.xsd. The service data object (SDO) interface of the GetProductAvailability BOD is com.ibm.commerce.inventory.datatypes.GetProductAvailabilityType.

 

Response

Response to a successful request is in the form of a ShowProductAvailability BOD. The XML schema of the ShowProductAvailability BOD can be found in the XML schema file WC_eardir/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowProductAvailability.xsd. The service data object (SDO) interface of the ShowProductAvailability BOD is com.ibm.commerce.inventory.datatypes.ShowProductAvailabilityType.

 

Message type

This outbound service interface is mapped to the message type com.ibm.commerce.inventory.GetProductAvailability, or com.ibm.commerce.inventory if the former is not defined.

 

Client task command

This outbound service interface can be invoked by calling the inventory client task command com.ibm.commerce.inventory.client.commands.GetProductAvailabilityCmd with action GetProductAvailability. Its default implementation, com.ibm.commerce.inventory.client.commands.GetProductAvailabilityCmdImpl , behaves as follows:

  1. It first calls the protected method composeGetProductAvailability() to compose a GetProductAvailability SDO from the SKU specified.

  2. It then passes the action and the GetProductAvailability SDO to the inventory client facade implementation to make the outbound service request.

 

Usage scenario

  1. To display the availability of a product, the data bean manager activates the inventory data bean com.ibm.commerce.inventory.beans.ProductAvailabilityDataBean .

  2. The corresponding data bean command com.ibm.commerce.inventory.beans.commands.ProductAvailabilityDataBeanCmd is called to populate the data bean.

  3. If the availability of the product is not cached by the local inventory cache, the default implementation of this data bean command, com.ibm.commerce.inventory.beans.commands.ProductAvailabilityDataBeanCmdImpl , calls the inventory client task command com.ibm.commerce.inventory.client.commands.GetProductAvailabilityCmd with action GetProductAvailability and the SKU of the product to retrieve its availability from the external system.

Related concepts

WebSphere Commerce Web services with JSP pages

WebSphere Commerce as a service consumer

Related tasks

Enabling WebSphere Commerce as a service consumer

Related reference

Outbound service interfaces

Service-oriented outbound integration points