6.0.0.2 Get detailed order information by order ID
This service gets detailed information for an order. Before using this service, the client must have a reference to the order facade client.
Usage scenario
- The client calls the order facade client method getOrder() with the following parameters(orderId).
- OrderFacadeClient composes an SDO and calls the GetOrder service with XPath query "/Order[OrderIdentifier[(UniqueID='1111')]]" and access profile WC_OrderDetailsProfile which indicates that detailed order information is required.
- The Order component queries the database with the search condition from the XPath.
- The Order component composes the ShowOrder SDO according to the access profile.
Request
Request BOD GetOrder business object document (BOD) Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetOrder.xsd Service data object com.ibm.commerce.order.facade.datatypes.GetOrderType
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:GetOrder 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:28:26.062Z </oa:CreationDateTime> <oa:BODID> 5621e920-ad30-11db-832d-831645b86890 </oa:BODID> </oa:ApplicationArea> <_ord:DataArea> <oa:Get> <oa:Expression expressionLanguage="wc:XPath"> {ibmwcf.ap=WC_UsableShippingInfoProfile}/Order[OrderIdentifier[(UniqueID=43141)]] </oa:Expression> </oa:Get> </_ord:DataArea> </_ord:GetOrder> </soapenv:Body> </soapenv:Envelope>
Response
Post conditions: The response is the ShowOrder BOD containing the current shopping carts with detailed information (order, order item, kit detail information, shipping information, payment information).
Schema:
Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowOrder.xsdService data object:
com.ibm.commerce.order.facade.datatypes.ShowOrderTypeThe response contains the order information:
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:ShowOrder 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"> <_ord:DataArea> <oa:Show recordSetCount="1" recordSetStartNumber="0" recordSetTotal="1" /> <_ord:Order> <_ord:OrderIdentifier> <_wcf:UniqueID>43141</_wcf:UniqueID> </_ord:OrderIdentifier> <_ord:UsableShippingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableShippingAddress> <_ord:UsableShippingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableShippingAddress> <_ord:OrderItem> <_ord:OrderItemIdentifier> <_wcf:UniqueID>540331</_wcf:UniqueID> </_ord:OrderItemIdentifier> <_ord:UsableShippingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableShippingAddress> <_ord:UsableShippingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableShippingAddress> <_ord:UsableShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10001</_ord:UniqueID> </_ord:ShippingModeIdentifier> <_ord:Description language="-1"> International mail </_ord:Description> </_ord:UsableShippingMode> <_ord:UsableShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10002</_ord:UniqueID> </_ord:ShippingModeIdentifier> <_ord:Description language="-1"> Express mail </_ord:Description> </_ord:UsableShippingMode> <_ord:UsableShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10003</_ord:UniqueID> </_ord:ShippingModeIdentifier> <_ord:Description language="-1"> Courier </_ord:Description> </_ord:UsableShippingMode> </_ord:OrderItem> <_ord:OrderItem> <_ord:OrderItemIdentifier> <_wcf:UniqueID>540332</_wcf:UniqueID> </_ord:OrderItemIdentifier> <_ord:UsableShippingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableShippingAddress> <_ord:UsableShippingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableShippingAddress> <_ord:UsableShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10001</_ord:UniqueID> </_ord:ShippingModeIdentifier> <_ord:Description language="-1"> International mail </_ord:Description> </_ord:UsableShippingMode> <_ord:UsableShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10002</_ord:UniqueID> </_ord:ShippingModeIdentifier> <_ord:Description language="-1"> Express mail </_ord:Description> </_ord:UsableShippingMode> <_ord:UsableShippingMode> <_ord:ShippingModeIdentifier> <_ord:UniqueID>10003</_ord:UniqueID> </_ord:ShippingModeIdentifier> <_ord:Description language="-1"> Courier </_ord:Description> </_ord:UsableShippingMode> </_ord:OrderItem> </_ord:Order> </_ord:DataArea> </_ord:ShowOrder> </soapenv:Body> </soapenv:Envelope>
Exceptions
If there is something wrong with the parameter, the Order component fails to get the order. The Order component responds with a ShowOrder BOD with ChangeStatus, which indicates that the action failed.
See the exception conditions for ResolveOrdersCmd.
Customization
The following extensions are supported:
- Extend the ComposeOrderDetailsCmdImpl or ComposeOrderSummaryCmdImpl to populate extra information into the ShowOrder object.
Related concepts
Service Data Objects (SDO)
Related Reference
WebSphere Commerce services
Order services