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
Transfer order
The TransferOrder outbound service interface is used to transfer an order to an external system.
Request
A request to this outbound service interface is in the form of a ProcessOrder business object document (BOD) with action code Transfer. The definition of the ProcessOrder BOD can be found in the XML schema file WC_EAR/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ProcessOrder.xsd. The service data object (SDO) interface of the ProcessOrder BOD is com.ibm.commerce.order.datatypes.ProcessOrderType.
Response
The response to a successful request is in the form of an AcknowledgeOrder BOD with no response criteria. The XML schema of the ProcessOrder BOD can be found in the XML schema file WC_EAR/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/AcknowledgeOrder.xsd. The service data object (SDO) interface of the AcknowledgeOrder BOD is com.ibm.commerce.order.datatypes.AcknowledgeOrderType.
Message type
This outbound service interface is mapped to the message type com.ibm.commerce.order.TransferOrder, or com.ibm.commerce.order if the former is not defined.
Client task command
This outbound service interface can be invoked by calling the order client task command com.ibm.commerce.order.client.commands.ProcessOrderCmd with action TransferOrder. Its default implementation, com.ibm.commerce.order.client.commands.ProcessOrderCmdImpl , behaves...
- It first calls the protected method composeProcessOrder() to compose a ProcessOrder SDO from the order ID or order access bean specified.
- It then passes the action and the ProcessOrder SDO to the order client facade implementation to make the outbound service request.
Usage scenario
- When an order is submitted by either a shopper or customer service representative (CSR), the command com.ibm.commerce.order.client.commands.ProcessOrderCmd is called.
- Towards the end of its execution, sdts default implementation, com.ibm.commerce.order.client.commands.ProcessOrderCmdImpl raises the event OrderSubmit.
- The order submit event listener, which listens to the event, calls the command com.ibm.commerce.order.event.ProcessOrderSubmitEventCmd .
- The SOI-specific implementation of this command, com.ibm.commerce.soi.commands.SOIProcessOrderSubmitEventCmdImpl , calls the order client task command com.ibm.commerce.order.client.commands.ProcessOrderCmd with action TransferOrder to transfer the order to the external system.
- Alternatively, the order component can be configured such that the command com.ibm.commerce.order.event.ProcessOrderSubmitEventCmd is called when the event PaymentAuthorizationComplete is raised, so that the order is not transferred until payment has been authorized.
- Open the WebSphere Commerce Configuration file.
- Disable the OrderSubmit Event and enable the Payment Authorization Complete Event as shown in the following example:
<component compClassName="com.ibm.commerce.event.impl.ECEventEnableComponent" enable="false" name="OrderSubmit Event"> <property display="false"> <event name="OrderSubmit"/> </property> </component> <component compClassName="com.ibm.commerce.event.impl.ECEventEnableComponent" enable="true" name="Payment Authorization Complete Event"> <property display="false"> <event name="PaymentAuthorizationComplete"/> </property> </component>
- Propagate your changes to the WebSphere Commerce configuration file.
To use OrderProcessCmdImpl to transfer the order, use the SOIExtOrderProcessCmdImpl extension point. You must update the CMDREG table for the ExtOrderProcessCmd interface to use the SOIExtOrderProcessCmdImpl class.
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
Service-oriented outbound integration points