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 workspace_dir/WebServicesRouter/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 workspace_dir/WebServicesRouter/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:
- It first calls the protected method
composeGetProductAvailability()to compose aGetProductAvailabilitySDO from the SKU specified. - It then passes the action and the
GetProductAvailabilitySDO to the inventory client facade implementation to make the outbound service request.
Usage scenario
- To display the availability of a product, the data bean manager
activates the inventory data bean
com.ibm.commerce.inventory.beans.ProductAvailabilityDataBean. - The corresponding data bean command
com.ibm.commerce.inventory.beans.commands.ProductAvailabilityDataBeanCmdis called to populate the data bean. - 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 commandcom.ibm.commerce.inventory.client.commands.GetProductAvailabilityCmdwith actionGetProductAvailabilityand the SKU of the product to retrieve its availability from the external system.