Loading the attribute dictionary
To use any attribute dictionary data you create, you must first load the data
into WebSphere Commerce. This topic uses the mass load utility to load data into your database.
Procedure
-
Make a backup copy of the existing wcs.dtd file under the following
directory:
- workspace_dir\wc\xml\schema\dtd
- WC_installdir\AppServer\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear\xml\schema\dtd
- Open the wcs.dtd in a text editor.
-
Locate component-services.dtd under the following directory; then open it
in a text editor:
- WCDE_installdir\components\component-services\xml
- WC_installdir\components\component-services\xml
-
Copy the following content (in bold) from the
component-services.xml file:
and merge it with the import element in the wcs.dtd file:<!ELEMENT import (( attrtype | attr | attrdesc | attrval | attrvaldesc | catentryattr | attrdict | attrdictgrp | attrdictgrpdesc | attrdictgrpattrrel | attrdictgrprel | dmcampaign | dmtemplatetype | dmacttype | dmactivity | dmelementtype | dmeletemplate | dmelement | dmtriglstn | dmelementnvp | dmpage | dmemspotpage | dmemspotord | dmemspotcmd | dmemspotdef | dmexptype | px_promocd | px_promoaudit | px_promoauth | px_description | px_element | px_elementnvp)*)>
Note: You must add the|
character.tfalgtypds | tfalregdsc | tfdomain | tfdomdsc | tfexteng | tfsbdomain | tfsbdomdsc | tftradeng | tftrengdsc | tickler | tklacthist | tklractdsc | tklraction | tklrreason | tklrrsndsc | tmpbolist | tmpcmplist | tmpffclist | tmpprocid | tmpradtl | tmprctlist | torcpmap | tradeposcn | trading | transport | trdattach | trddepamt | trddesc | trdpscnxml | trdpuramt | trdrefamt | trdtype | trdtypedsc | txcdclass | txcdscheme | userdemo | userprof | userpvcdev | userpwdhst | userreg | users | usrtraffic | utmerinfo | utregip | vendor | vendordesc | versionspc | wcsdictnry | wcsdtnryds | wcsgbldata | wmmmap | wsalesvw | wtaxinfo | wusrtrvw | attrtype | attr | attrdesc | attrval | attrvaldesc | catentryattr | attrdict | attrdictgrp | attrdictgrpdesc | attrdictgrpattrrel | attrdictgrprel | dmcampaign | dmtemplatetype | dmacttype | dmactivity | dmelementtype | dmeletemplate | dmelement | dmtriglstn | dmelementnvp | dmpage | dmemspotpage | dmemspotord | dmemspotcmd | dmemspotdef | dmexptype | px_promocd | px_promoaudit | px_promoauth | px_description | px_element | px_elementnv)*)>
-
Copy all the element definitions of the new tables from the
component-services.xml file and paste the element definitions at the end of the
wcs.dtd file:
<!ELEMENT attr EMPTY> <!ATTLIST attr attr_id CDATA #REQUIRED identifier CDATA #REQUIRED attrtype_id CDATA #REQUIRED attrdict_id CDATA #IMPLIED storeent_id CDATA #REQUIRED optcounter CDATA "0" > … <!ELEMENT px_elementnvp EMPTY> <!ATTLIST px_elementnvp px_elementnvp_id CDATA #REQUIRED px_element_id CDATA #REQUIRED name CDATA #REQUIRED value CDATA #REQUIRED optcounter CDATA "0" >
-
Prepare the massload
data in an XML file; then place the file in the following directory:
- \xml\schema\
- WC_installdir\AppServer\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear\xml\schema\
Note: If you place this file in different directory, you must modify the relative path to the wcs.dtd file. - Ensure that the server is not running.
-
Open a command window, go to the directory where you put the mass load XML file and run the
following command:
- WCDE_installdir\bin\idresgen.bat CreateAttributeDictionaryAttributeData.catentry.xml outputxml dbname user password schemaname
- WC_installdir\bin\idresgen.bat CreateAttributeDictionaryAttributeData.catentry.xml outputxml dbname user password schemaname
Note: A database does not need the dbname, user, password and schemaname. -
Run massload with the outputxml from the previous step as input:
- WCDE_installdir\bin\massload.bat outputxml dbname user password schemaname
- WC_installdir\bin\massload.bat outputxml dbname user password schemaname
- Check the database to make sure that the data is loaded.