Develop > Persistence layer > WebSphere Commerce Web services with JSP pages > Understand the WebSphere Commerce Web service framework > WebSphere Commerce as a service consumer > Outbound service interfaces
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 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_EAR/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 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_EAR/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.
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...
- It first calls the protected method composeGetProductAvailability() to compose a GetProductAvailability SDO from the SKU specified.
- It then passes the action and the GetProductAvailability SDO to the inventory client facade implementation to make the outbound service request.
- 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.ProductAvailabilityDataBeanCmd is 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 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.
WebSphere Commerce Web services with JSP pages
WebSphere Commerce as a service consumer
Enable WebSphere Commerce as a service consumer
Outbound service interfaces
Service-oriented outbound integration points