6.0.0.2 Submit an order
This service submits the order. Before using this service, the following conditions must be met:
- The client must have a reference to the order facade client.
- A shopping cart must exist on the server side.
- The order must be prepared.
Scenario
- The client calls the order facade client method submitOrder() with the following parameters: (orderId, purchaseorder_id).
- OrderFacadeClient composes an SDO and then calls the ProcessOrder service with the action code Submit.
- The order is submitted in the WebSphere Commerce Server.
- The order component responds with an AcknowledgeOrder BOD containing an order ID.
Request
Request BOD ProcessOrder business object document (BOD) Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ProcessOrder.xsd Service data object
com.ibm.commerce.order.facade.datatypes.ProcessOrderType
Sample request BOD
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header /> <soapenv:Body> <_ord:ProcessOrder xmlns:_ord="http://www.ibm.com/xmlns/prod/commerce/9/order" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType"> <oa:CreationDateTime> 2007-01-26T19:24:20.171Z </oa:CreationDateTime> <oa:BODID> c391ebf0-ad2f-11db-832d-831645b86890 </oa:BODID> </oa:ApplicationArea> <_ord:DataArea> <oa:Process> <oa:ActionCriteria> <oa:ActionExpression actionCode="Submit" /> </oa:ActionCriteria> </oa:Process> <_ord:Order> <_ord:OrderIdentifier> <_wcf:UniqueID>43140</_wcf:UniqueID> </_ord:OrderIdentifier> <_ord:OrderPaymentInfo> <_ord:PaymentInstruction /> </_ord:OrderPaymentInfo> </_ord:Order> </_ord:DataArea> </_ord:ProcessOrder> </soapenv:Body> </soapenv:Envelope>
Response
Response BOD AcknowledgeOrder link to generated doc Schema
Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/AcknowledgeOrder.xsdService data object
com.ibm.commerce.order.facade.datatypes.AcknowledgeOrderTypeThe response contains the following information:
/Order/OrderIdentifier/UniqueID
Sample response BOD
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header /> <soapenv:Body> <_ord:AcknowledgeOrder xmlns:_ord="http://www.ibm.com/xmlns/prod/commerce/9/order" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation"> <_ord:DataArea> <_ord:Order> <_ord:OrderIdentifier> <_wcf:UniqueID>43140</_wcf:UniqueID> </_ord:OrderIdentifier> </_ord:Order> </_ord:DataArea> </_ord:AcknowledgeOrder> </soapenv:Body> </soapenv:Envelope>Alternative Flow
- The client calls the order facade client method submitOrder() with the following parameters: (orderId, purchaseorder_id,piId).
- OrderFacadeClient composes an SDO and calls the ProcessOrder service with the action code Submit.
- The payment instruction is added to the order and the Order is submitted in the WebSphere Commerce Server.
- The Order component responds with an AcknowledgeOrder BOD with order ID.
Exception Flow
Behavior
If there is something wrong with the parameter, the Order component fails to prepare the Order. The Order component responds with an AcknowledgeOrder BOD with ChangeStatus, which indicates that the action failed.
Exceptions
Behavior
- The order is not locked.
- The Order component responds with an AcknowledgeOrder BOD with ChangeStatus, which indicates that the order is not locked.
- The shopper checks the order and prepares it.
- The Order is prepared; the Order component responds with an AcknowledgeOrder BOD with order ID.
See the exception conditions for
OrderProcess URL.
Customization
The following extensions are supported:
- Extend the methods buildOrderIdentifier of OrderFacadeClient to handle the input parameters.
- Extend the command AcknowledgeOrderBuildCmdImpl to populate information into the response.
- Customize the messaging mapping file ProcessOrderSOIBODMapping.xml by finding this section:
Condition='actionCode="Submit" AND actionExpression="/Order"
Replace the AcknowledgeOrderBuildCmdImpl with the new command that extends AcknowledgeOrderBuildCmdImpl.
Related concepts
Service Data Objects (SDO)
Related Reference
WebSphere Commerce services
Order services