6.0.0.2 Cancel shopping cart

This service cancels a shopping cart. The client has a reference to the order facade client, and a shopping cart exists on the server.

 

Usage scenario

  1. The client calls the order facade client method cancelShoppingCart() with the following parameter: (orderId)

  2. OrderFacadeClient composes an SDO and calls the ProcessOrder service using the action code Cancel.

  3. The shopping cart is canceled in the WebSphere Commerce Server.

  4. The Order component responds with an AcknowledgeOrder BOD with an order ID that indicates that the order is canceled.

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:18:53.812Z
                                </oa:CreationDateTime>
                                <oa:BODID>
                                       
010b7d80-ad2f-11db-832d-831645b86890
                                </oa:BODID>
                        </oa:ApplicationArea>
                        <_ord:DataArea>
                                <oa:Process>
                                        <oa:ActionCriteria>
                                               
<oa:ActionExpression actionCode="Cancel"
                                                       
expressionLanguage="wc:XPath">
                                                        /Order
                                               
</oa:ActionExpression>
                                        </oa:ActionCriteria>
                                </oa:Process>
                                <_ord:Order>
                                       
<_ord:OrderIdentifier>
                                               
<_wcf:UniqueID>.</_wcf:UniqueID>
                                       
</_ord:OrderIdentifier>
                                </_ord:Order>
                        </_ord:DataArea>
                </_ord:ProcessOrder>
        </soapenv:Body>
</soapenv:Envelope>

 

Response

The response is an AcknowledgeOrder BOD with order ID, and the shopping cart has been canceled.

Response BOD AcknowledgeOrder
Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/AcknowledgeOrder.xsd
Service data object com.ibm.commerce.order.facade.datatypes.AcknowledgeOrderType

The 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>43137</_wcf:UniqueID>
                                       
</_ord:OrderIdentifier>
                                </_ord:Order>
                        </_ord:DataArea>
                </_ord:AcknowledgeOrder>
        </soapenv:Body>
</soapenv:Envelope>

 

Exceptions

If there is something wrong with the parameter, the Order component fails to cancel the shopping cart. The Order component responds with an AcknowledgeOrder BOD with ChangeStatus, which indicates that the action failed.

See the exception conditions for
OrderCancel URL.

 

Customization

The following extensions are supported:

Related concepts

Service Data Objects (SDO)


Related Reference


WebSphere Commerce services
Order services