In this lesson, you create an XML file to contain the catalog
entry, warranty, and care instruction data to load with the Data Load
utility.
About this task
The XML file is based on the data that is created in the Tutorial: Extending a BOD service to manage UserData with the Data Service layer.
This file contains catalog entry base and description information,
warranty information, and care instruction information, which extends
the catalog entry object.
Procedure
- Create the WCDE_installdir\samples\Dataload\warranty\ directory.
- Create a warranty.xml file in the WCDE_installdir\samples\Dataload\warranty\ directory.
- Copy the following content into your warranty.xml file.
<?xml version="1.0" encoding="utf-8"?>
<customInfo>
<customProductInfo partNumber="MW-0003" Type="ProductBean">
<warranty warrantyTerm="30" warrantyType="LIMITED"/>
<attributes>
<attribute name="manufacturerPartNumber" value="" />
<attribute name="manufacturer" value="MapleWear" />
<attribute name="url" value="" />
<attribute name="field1" value="1" />
<attribute name="field2" value="1" />
<attribute name="field3" value="1" />
<attribute name="field4" value="" />
<attribute name="field5" value="" />
<attribute name="onSpecial" value="1" />
<attribute name="onAuction" value="1" />
<attribute name="buyable" value="1" />
</attributes>
<description language="-1" Name="Striped turtleneck"
ShortDescription="Soft, stretchy rib-knit turtleneck."
LongDescription="This soft, stretchy rib-knit turtleneck is perfect either on its own or layered under a jumper."
Thumbnail="images/catalog/apparel/apparel_70x70/IMG_0003_e.jpg"
FullImage="images/catalog/apparel/apparel_160x160/IMG_0003_e.jpg"
Keyword="">
<attribute name="careinstruction" value="Avoid soap and water"/>
<attribute name="auxDescription1" value=""/>
<attribute name="auxDescription2" value=""/>
<attribute name="available" value="1"/>
<attribute name="availabilityDate" value="2008-09-03 16:00:00"/>
<attribute name="published" value="1"/>
</description>
</customProductInfo>
</customInfo>
The customProductInfo
element
maps to a catalog entry noun, while the description
element
maps to a catalog entry description noun part.
The data load
utility supports creating, replacing, or deleting data objects in
the database table. To replace data objects in the database, ensure
that you supply all attributes. In the preceding example, all catalog
entry information is provided.
- Save and close the file.