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


Check or reserve or cancel order inventory

The CheckOrderInventory outbound service interface is used to check the inventory availability of an order on an external system if the information is not cached by the local inventory cache. The ReserveOrderInventory outbound service interface is used to update the inventory reservation of an order on an external system. The CancelOrderInventory outbound service interface is used to cancel the inventory reservation of an order on an external system.


Request

A request to the CheckOrderInventory outbound service interface is in the form of a ProcessOrderInventory business object document (BOD) with action code Check. A request to the ReserveOrderInventory interface is in the form of a ProcessOrderInventory BOD with action code Reserve. A request to the CancelOrderInventory interface is in the form of a ProcessOrderInventory BOD with action code Cancel. The definition of the ProcessOrderInventory BOD can be found in the XML schema file WC_EAR/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ProcessOrderInventory.xsd. The service data object (SDO) interface of the ProcessOrderInventory BOD is com.ibm.commerce.inventory.datatypes.ProcessOrderInventoryType.


Response

The response to a successful request is in the form of an AcknowledgeOrderInventory BOD with no response criteria. The XML schema of the AcknowledgeOrderInventory BOD can be found in the XML schema file WC_EAR/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/AcknowledgeOrderInventory.xsd. The service data object (SDO) interface of the AcknowledgeOrderInventory BOD is com.ibm.commerce.inventory.datatypes.AcknowledgeOrderInventoryType.


Message type

The CheckOrderInventory outbound service interface is mapped to the message type com.ibm.commerce.inventory.CheckOrderInventory, or com.ibm.commerce.inventory if the former is not defined. The ReserveOrderInventory interface is mapped to the message type com.ibm.commerce.inventory.ReserveOrderInventory, or com.ibm.commerce.inventory if the former is not defined. The CancelOrderInventory outbound service interface is mapped to the message type com.ibm.commerce.inventory.CancelOrderInventory, 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.ProcessOrderInventoryCmd with action CheckOrderInventory, ReserveOrderInventory or CancelOrderInventory. Its default implementation, com.ibm.commerce.inventory.client.commands.ProcessOrderInventoryCmdImpl , behaves...


Usage scenarios


Check order inventory

  1. When a shopping cart is being updated, the command com.ibm.commerce.inventory.commands.DoInventoryActionCmd is called by the order commands to check its inventory availability.

  2. With the store configured to use an external system for inventory management, if the information is not cached by the local inventory cache, the default implementation of this command, com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl , calls the inventory client task command com.ibm.commerce.inventory.client.commands.ProcessOrderInventoryCmd with action CheckOrderInventory to check its inventory availability on the external system.


Reserve order inventory

  1. When a shopping cart is being prepared for submission, the command com.ibm.commerce.inventory.commands.DoInventoryActionCmd is called by the command com.ibm.commerce.order.commands.PrepareOrderCmd to update its inventory reservation.

  2. With the store configured to use an external system for inventory management, the default implementation of this command, com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl , calls the inventory client task command com.ibm.commerce.inventory.client.commands.ProcessOrderInventoryCmd with action ReserveOrderInventory to update its inventory reservation on the external system.


Cancel order inventory

  1. When an order is being cancelled or unlocked, the command com.ibm.commerce.inventory.commands.DoInventoryActionCmd is called by the order commands to cancel its inventory reservation.

  2. With the store configured to use an external system for inventory management, if inventory has been reserved for the order, the default implementation of this command, com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl , calls the inventory client task command com.ibm.commerce.inventory.client.commands.ProcessOrderInventoryCmd with action CancelOrderInventory to cancel its inventory reservation on the external system.


Related concepts

WebSphere Commerce Web services with JSP pages

WebSphere Commerce as a service consumer


Related tasks

Enable WebSphere Commerce as a service consumer

Related reference

Outbound service interfaces

Service-oriented outbound integration points


+

Search Tips   |   Advanced Search