6.0.0.2 Update shipping information
This service updates shipping information (shipping mode, shipping address) for a shopping cart. The client has a reference to the order facade client, and a shopping cart exists on the server.
Usage scenario
- The client calls the order facade client method updateShippingInfo() with the following parameters: (ShipAsComplete,orderId,orderItemId, ,requestedShipDate,shipModeId,isExpedited,addressId,shipInstructions,tieShipCode).
- OrderFacadeClient composes an SDO and then calls the ChangeOrder service using the action code Update and XPath query /Order/OrderItem/OrderItemShippingInfo
- The shipping information for the order and order items is updated in the WebSphere Commerce Server.
- The order component responds with a RespondOrder BOD with an order ID and order item IDs that indicates that the update is successful.
Request
Request BOD ChangeOrder business object document (BOD). Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ChangeOrder.xsd Service data object
com.ibm.commerce.order.facade.datatypes.ChangeOrderType
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:ChangeOrder 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:13:58.968Z </oa:CreationDateTime> <oa:BODID> 514dddc0-ad2e-11db-832d-831645b86890 </oa:BODID> </oa:ApplicationArea> <_ord:DataArea> <oa:Change> <oa:ActionCriteria> <oa:ActionExpression actionCode="Update" expressionLanguage="wc:XPath"> /Order/OrderItem/OrderItemShippingInfo </oa:ActionExpression> </oa:ActionCriteria> </oa:Change> <_ord:Order shipAsComplete="false"> <_ord:OrderIdentifier> <_wcf:UniqueID>.</_wcf:UniqueID> </_ord:OrderIdentifier> <_ord:OrderItem> <_ord:OrderItemIdentifier> <_wcf:UniqueID>540328</_wcf:UniqueID> </_ord:OrderItemIdentifier> <_ord:OrderItemShippingInfo> <_ord:ShippingAddress> <_wcf:ContactInfoIdentifier> <_wcf:UniqueID>11301</_wcf:UniqueID> </_wcf:ContactInfoIdentifier> </_ord:ShippingAddress> <_ord:ShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10003</_ord:UniqueID> </_ord:ShippingModeIdentifier> </_ord:ShippingMode> <_ord:ShippingInstruction> hello </_ord:ShippingInstruction> <_ord:RequestedShipDate> 2007-02-02T03:32:34.953Z </_ord:RequestedShipDate> </_ord:OrderItemShippingInfo> </_ord:OrderItem> </_ord:Order> </_ord:DataArea> </_ord:ChangeOrder> </soapenv:Body> </soapenv:Envelope>
Response
The response is a RespondOrder BOD with order ID and order Item ID; the order item has been added to the order.
Response BOD RespondOrder Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/RespondOrder.xsd Service data object
com.ibm.commerce.order.facade.datatypes.RespondOrderTypeThe response contains the following information:
/Order/OrderIdentifier/UniqueID /Order/OrderItem/OrderItemIdentifier/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:RespondOrder 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:OrderItem> <_ord:OrderItemIdentifier> <_wcf:UniqueID>540328</_wcf:UniqueID> </_ord:OrderItemIdentifier> </_ord:OrderItem> </_ord:Order> </_ord:DataArea> </_ord:RespondOrder> </soapenv:Body> </soapenv:Envelope>
Exceptions
If there is something wrong with the parameter, the Order component fails to update the shipping information. The Order component responds with a RespondOrder BOD with ChangeStatus, which indicates that the action failed.
See the exception conditions for
OrderItemUpdate URL.
Customization
The following extensions are supported:
- Extend the methods buildOrderItem and buildOrderIdentifier of CommonOrderFacadeClient to handle the input parameters.
- Extend the command RespondOrderBuildCmdImpl to populate information into the response.
- Customize the messaging mapping file ChangeOrderSOIBODMapping.xml by finding this section:
Condition='actionCode="Update" AND actionExpression/Order/OrderItem/OrderItemShippingInfo"
Replace the RespondOrderBuildCmdImpl with the new command that extends RespondOrderBuildCmdImpl.
Related concepts
Service Data Objects (SDO)
Related Reference
WebSphere Commerce services
Order services