Get top categories

This service request, getTopCategories, returns all the top-level categories from a catalog under the store master catalog.

 

Request

Request BOD GetCatalogGroup
Access profile WC_CatalogGroupTopCategoriesProfile
Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetCatalogGroup.xsd
Service data object  

 

Sample request BOD

<_cat:GetCatalogGroup
       
xmlns:_cat="http://www.ibm.com/xmlns/prod/commerce/9/catalog"
       
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-25T14:30:47.464Z
                </oa:CreationDateTime>
               
<oa:BODID>8e595ac0-acaa-11db-91c1-832d45b90567</oa:BODID>
                <_wcf:BusinessContext>
                        <_wcf:ContextData
name="storeId">10051</_wcf:ContextData>
                        <_wcf:ContextData
name="catalogId">10051</_wcf:ContextData>
                </_wcf:BusinessContext>
        </oa:ApplicationArea>
        <_cat:DataArea>
                <oa:Get>
                        <oa:Expression
expressionLanguage="wcf:XPath">
                               
{_wcf.ap=WC_CatalogGroupTopCategoriesProfile}/CatalogGroup[@topCatalogGroup='true']
                        </oa:Expression>
                </oa:Get>
        </_cat:DataArea>
</_cat:GetCatalogGroup>

 

Response

Response BOD: ShowCatalogGroup

Schema: /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowCatalogGroup.xsd

Service data object:

The response will contain multiple CatalogGroup nouns.

/CatalogGroup/@displaySequence
/CatalogGroup/CatalogGroupIdentifier
/CatalogGroup/CatalogGroupIdentifier/UniqueId
/CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/@ownerId
/CatalogGroup/CatalogGroupIdentifier/Externalidentifier/GroupIdentifier
/CatalogGroup/Description/Name

Sample response BOD:

<_cat:ShowCatalogGroup
        xmlns:Oagis9="http://www.openapplications.org/oagis/9"
       
xmlns:_cat="http://www.ibm.com/xmlns/prod/commerce/9/catalog"
       
xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Oagis9:ApplicationArea
xsi:type="_wcf:ApplicationAreaType">
                <Oagis9:CreationDateTime>
                        2007-01-25T14:30:48.705Z
                </Oagis9:CreationDateTime>
                <Oagis9:BODID>
                        8f2e8510-acaa-11db-83a9-832d45b8fe37
                </Oagis9:BODID>
        </Oagis9:ApplicationArea>
        <_cat:DataArea>
                <Oagis9:Show recordSetCompleteIndicator="false"
/>
                <_cat:CatalogGroup displaySequence="0.0">
                        <_cat:CatalogGroupIdentifier>
                               
<_wcf:UniqueID>10051</_wcf:UniqueID>
                                <_wcf:ExternalIdentifier
                                       
ownerID="7000000000000000002">
                                       
<_wcf:GroupIdentifier>
                                                Woodworking
                                       
</_wcf:GroupIdentifier>
                                </_wcf:ExternalIdentifier>
                        </_cat:CatalogGroupIdentifier>
                        <_cat:Description>
                               
<_cat:Name>Woodworking</_cat:Name>
                        </_cat:Description>
                </_cat:CatalogGroup>
                <_cat:CatalogGroup displaySequence="1.0">
                        <_cat:CatalogGroupIdentifier>
                               
<_wcf:UniqueID>10052</_wcf:UniqueID>
                                <_wcf:ExternalIdentifier
                                       
ownerID="7000000000000000002">
                                       
<_wcf:GroupIdentifier>Power</_wcf:GroupIdentifier>
                                </_wcf:ExternalIdentifier>
                        </_cat:CatalogGroupIdentifier>
                        <_cat:Description>
                               
<_cat:Name>Power</_cat:Name>
                        </_cat:Description>
                </_cat:CatalogGroup>
                <_cat:CatalogGroup displaySequence="2.0">
                        <_cat:CatalogGroupIdentifier>
                               
<_wcf:UniqueID>10053</_wcf:UniqueID>
                                <_wcf:ExternalIdentifier
                                       
ownerID="7000000000000000002">
                                       
<_wcf:GroupIdentifier>
                                                New Arrivals
                                       
</_wcf:GroupIdentifier>
                                </_wcf:ExternalIdentifier>
                        </_cat:CatalogGroupIdentifier>
                        <_cat:Description>
                                <_cat:Name>New
arrivals</_cat:Name>
                        </_cat:Description>
                </_cat:CatalogGroup>
        </_cat:DataArea>
</_cat:ShowCatalogGroup>

 

Usage

To use this service request on a JSP page use the expression-builder, getTopCategories.

The expression-builder maps to the following XPath expression:

{_wcf.ap=$accessProfile$}/CatalogGroup[@topCatalogGroup='$booleanValue$')]]

The default values are:

In the business context, the storeId and catalogId must be specified.

This service request uses the
CatalogGroupDataBean and CatalogDataBean data beans.

Exceptions

If there is an error the error is reported in the Response message. You can see the error details in the trace log, SystemOut.log.

 

Customization

The following extensions are supported:

Related concepts

../../com.ibm.commerce.business_process.doc/concepts/processFind_product_(ConsumerDirect).htm
Design pattern for Get service implementation


Related Reference


WebSphere Commerce foundation tag library