Get catalog details by catalog ID

This service, getCatalogDetailsByID, returns catalog details by the catalog ID (the reference number of the catalog). A list of all catalogs returns if you pass in multiple catalog IDs. Catalog details include:

Request

Request BOD GetCatalog business object document (BOD).
Search expression {_wcf.ap=WC_CatalogDetailsProfile}/Catalog[CatalogIdentifier[(UniqueID='$catalogId$')]] The access profile, WC_CatalogDetailsProfile, controls which information is returned.
Schema Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetCatalog.xsd
Service data object com.ibm.commerce.catalog.facade.datatypes.GetCatalogType

 

Sample request BOD

<_cat:GetCatalog
       
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:00:33.225Z
                </oa:CreationDateTime>
               
<oa:BODID>551d6520-aca6-11db-b982-832d45b8fe51</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_CatalogDetailsProfile}/Catalog[CatalogIdentifier[(UniqueID='10001')]]
                        </oa:Expression>
                </oa:Get>
        </_cat:DataArea>
</_cat:GetCatalog>

 

Response

Response BOD ShowCatalog
Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowCatalog.xsd
Service data object com.ibm.commerce.catalog.facade.datatypes.ShowCatalogType

The response contains the following information:

/Catalog/@primary
/Catalog/CatalogIdentifier/UniqueID
/Catalog/CatalogIdentifier/ExternalIdentifier/@ownerID
/Catalog/CatalogIdentifier/ExternalIdentifier/Identifier
/Catalog/CatalogDescription/@language
/Catalog/CatalogDescription/Name
/Catalog/CatalogDescription/ThumbNail
/Catalog/CatalogDescription/FullImage
/Catalog/CatalogDescription/ShortDescription
/Catalog/CatalogDescription/LongDescription

 

Sample response BOD

<_cat:ShowCatalog
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:00:34.407Z
                </Oagis9:CreationDateTime>
                <Oagis9:BODID>
                        55c69d70-aca6-11db-83a9-832d45b8fe37
                </Oagis9:BODID>
        </Oagis9:ApplicationArea>
        <_cat:DataArea>
                <_cat:Catalog primary="true">
                        <_cat:CatalogIdentifier>
                               
<_wcf:UniqueID>10001</_wcf:UniqueID>
                                <_wcf:ExternalIdentifier
                                       
ownerID="7000000000000000002">
                                       
<_wcf:Identifier>AdvancedB2BDirect</_wcf:Identifier>
                                </_wcf:ExternalIdentifier>
                        </_cat:CatalogIdentifier>
                        <_cat:Description language="-1">
                                <_cat:Name>Store master
catalog</_cat:Name>
                                <_cat:LongDescription>
                                        Largest auto parts retailer
in the country. Our
                                        catalog cater to
do-it-yourself mechanics, as
                                        well as professional auto
shops. We sell all kinds
                                        of auto parts including a
large variety of brake
                                        pads, suspensions,
transmissions, electrical
                                        systems, entertainment
systems, batteries, lamps,
                                        starters, audio systems,
video systems, GPS
                                        navigation systems,
cylinders, tires, shocks,
                                        bearing, springs, clutches,
gears, differentials,
                                        and more.
                                </_cat:LongDescription>
                        </_cat:Description>
                </_cat:Catalog>
        </_cat:DataArea>
</_cat:ShowCatalog>

 

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.

 

Usage

There are three ways to call Web services:

Call Web services in JSP pages

To use this service request on a JSP page, you have the choices between two expression builders: getCatalogGroupDetailsByID and getCatalogGroupDetailsByIDs. The getCatalogGroupDetailsByID accept one catGroupId as parameter and maps to the following XPath expression: {_wcf.ap=$accessProfile$}/CatalogGroup[CatalogGroupIdentifier[UniqueID='$catGroupId$']]. The default is: accessProfile=WC_CatalogGroupDetailsProfile. The getCatalogGroupDetailsByIDs accept a list of catGroupId as parameters and as such should be used to return the details of multiple categories. The accessProfile used is WC_CatalogGroupDetailsProfile. Here is an example on how to use this in a JSP:
<wcf:getData
       
type="com.ibm.commerce.catalog.facade.datatypes.CatalogGroupType[]"
        var="catalogGroups"
        expressionBuilder="getCatalogGroupDetailsByIDs">
        <c:forEach var="uniqueId"   uniqueIDs="the list of
Ids">
                <wcf:param name="UniqueID"    
value="${uniqueID}" />
        </c:forEach>
</wcf:getData>
This service request uses the CatalogGroupDataBean data bean.

Call Web services in Java client

To call catalog services create a Get BOD then call the correct client API.

Call Web services

Use any standard Web services invocation method.

 

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