Get catalog details by identifier
This service request, getCatalogDetailsByIdentifier, returns catalog details by the catalog external identifier. A list of Catalog nouns returns if you pass in multiple catalog identifiers. Catalog details include:
- identifier
- name
- thumbnail image
- full image name
- short description
- long description
Request
Request GetCatalog business object document (BOD). Access profile WC_CatalogDetailsProfile The access profile defines the information that will be returned in the response.
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:25:28.255Z </oa:CreationDateTime> <oa:BODID>d0344aa0-aca9-11db-8af2-832d45b90428</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[ExternalIdentifier[Identifier='AdvancedB2BDirect']]] </oa:Expression> </oa:Get> </_cat:DataArea> </_cat:GetCatalog>
Response
Response BOD ShowCatalogType 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:25:29.607Z </Oagis9:CreationDateTime> <Oagis9:BODID> d0fc0770-aca9-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>
Usage
To use this service request on a JSP page use the expression-builder, getCatalogDetailsByIdentifier, and pass the catalogIdentifier parameter.
The expression-builder maps to the following XPath expression:
{_wcf.ap=WC_CatalogDetailsProfile}/Catalog[CatalogIdentifier[ExternalIdentifier[Identifier='$catalogIdentifier$']]]
The default is: accessProfile=WC_CatalogGroupDetailsProfile.
This service request uses the CatalogDataBean 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:
- Create your own implementation of the interface ComposeCatalogTaskCmd. By creating your own implementation of the ComposeCatalogTaskCmd, and an access profile, you can control the information returned by the service.
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