Get category with children categories

This service request, getCategoryWithChildrenCategories, returns all the child catalog groups and the displays details of a category. The catalog group id is used in the request.

 

Request

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

 

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:29:56.731Z
                </oa:CreationDateTime>
               
<oa:BODID>6ff35f40-acaa-11db-9d8f-832d45b90534</oa:BODID>
                <_wcf:BusinessContext>
                        <_wcf:ContextData
name="storeId">10001</_wcf:ContextData>
                        <_wcf:ContextData
name="catalogId">10001</_wcf:ContextData>
                </_wcf:BusinessContext>
        </oa:ApplicationArea>
        <_cat:DataArea>
                <oa:Get>
                        <oa:Expression
expressionLanguage="wcf:XPath">
                               
{_wcf.ap=WC_CatalogGroupCatalogGroupChildrenProfile}/CatalogGroup[CatalogGroupIdentifier[UniqueID='10001']]
                        </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 ShowCatalogGroupType

The response contains the following information:

/CatalogGroup/CatalogGroupIdentifier/UniqueID
/CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/@ownerID
/CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier
/CatalogGroup/Description/@language
/CatalogGroup/Description/Name
/CatalogGroup/Description/ThumbNail
/CatalogGroup/Description/ShortDescription
/CatalogGroup/Description/FullImage
/CatalogGroup/Description/LongDescription
/CatalogGroup/NavigationRelationship/@displaySequence
/CatalogGroup/NavigationRelationship/CatalogGroupReference/displayName
/CatalogGroup/NavigationRelationship/CatalogGroupReference
/CatalogGroupIdentifier/UniqueID
/CatalogGroup/NavigationRelationship/CatalogGroupReference/CatalogGroupIdentifier/ExternalIdentifier/@ownerID
/CatalogGroup/NavigationRelationship/CatalogGroupReference/CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier

 

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:00.777Z
                </Oagis9:CreationDateTime>
                <Oagis9:BODID>
                        729d4990-acaa-11db-83a9-832d45b8fe37
                </Oagis9:BODID>
        </Oagis9:ApplicationArea>
        <_cat:DataArea>
                <Oagis9:Show recordSetCompleteIndicator="false"
/>
                <_cat:CatalogGroup>
                        <_cat:CatalogGroupIdentifier>
                               
<_wcf:UniqueID>10001</_wcf:UniqueID>
                                <_wcf:ExternalIdentifier
                                       
ownerID="7000000000000000002">
                                       
<_wcf:GroupIdentifier>
                                                Brakes components
                                       
</_wcf:GroupIdentifier>
                                </_wcf:ExternalIdentifier>
                        </_cat:CatalogGroupIdentifier>
                        <_cat:Description language="-1">
                               
<_cat:Name>Brakes</_cat:Name>
                               
<_cat:Thumbnail>images/h_brakes.jpg</_cat:Thumbnail>
                                <_cat:FullImage>
                                        images/toplvl_brakes.jpg
                                </_cat:FullImage>
                                <_cat:ShortDescription>
                                        Brakes components
                                </_cat:ShortDescription>
                                <_cat:LongDescription>
                                        Brakes components
                                </_cat:LongDescription>
                        </_cat:Description>
                        <_cat:NavigationRelationship
displaySequence="0.0">
                                <_cat:CatalogGroupReference>
                                       
<_cat:CatalogGroupIdentifier>
                                               
<_wcf:UniqueID>10008</_wcf:UniqueID>
                                               
<_wcf:ExternalIdentifier
                                                       
ownerID="7000000000000000002">
                                                       
<_wcf:GroupIdentifier>
                                                               
Brake pads
                                                       
</_wcf:GroupIdentifier>
                                               
</_wcf:ExternalIdentifier>
                                       
</_cat:CatalogGroupIdentifier>
                                       
<_cat:displayName>Brake pads</_cat:displayName>
                                </_cat:CatalogGroupReference>
                        </_cat:NavigationRelationship>
                        <_cat:NavigationRelationship
displaySequence="1.0">
                                <_cat:CatalogGroupReference>
                                       
<_cat:CatalogGroupIdentifier>
                                               
<_wcf:UniqueID>10009</_wcf:UniqueID>
                                               
<_wcf:ExternalIdentifier
                                                       
ownerID="7000000000000000002">
                                                       
<_wcf:GroupIdentifier>
                                                               
Master Cylinders
                                                       
</_wcf:GroupIdentifier>
                                               
</_wcf:ExternalIdentifier>
                                       
</_cat:CatalogGroupIdentifier>
                                        <_cat:displayName>
                                                Master Cylinders
                                        </_cat:displayName>
                                </_cat:CatalogGroupReference>
                        </_cat:NavigationRelationship>
                        <_cat:NavigationRelationship
displaySequence="2.0">
                                <_cat:CatalogGroupReference>
                                       
<_cat:CatalogGroupIdentifier>
                                               
<_wcf:UniqueID>10010</_wcf:UniqueID>
                                               
<_wcf:ExternalIdentifier
                                                       
ownerID="7000000000000000002">
                                                       
<_wcf:GroupIdentifier>
                                                               
Tires
                                                       
</_wcf:GroupIdentifier>
                                               
</_wcf:ExternalIdentifier>
                                       
</_cat:CatalogGroupIdentifier>
                                       
<_cat:displayName>Tires</_cat:displayName>
                                </_cat:CatalogGroupReference>
                        </_cat:NavigationRelationship>
                </_cat:CatalogGroup>
        </_cat:DataArea>
</_cat:ShowCatalogGroup>

 

Usage

To use this service request on a JSP page use the expression-builder, getCategoryWithChildrenCategories, and pass the catGroupId parameter.

The expression-builder maps to the following XPath expression:

{_wcf.ap=$accessProfile$}/CatalogGroup[CatalogGroupIdentifier[UniqueID='$catGroupId$']]

The default is: accessProfile=WC_CatalogGroupCatalogGroupChildrenProfile

This service request uses the
CatalogGroupDataBean data bean.

 

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