Including extended attributes in the API template

The extended attributes appear as a separate <Extn> element under the primary element.

For example, in the default output XML template of the getItemDetails() API, the Item attributes have the following structure:

<?xml version="1.0" encoding="UTF-8"?>
 <Item .. Item attributes >
    <PrimaryInformation .... PrimaryInformation attributes />
    <ItemServiceSkillList .. ItemServiceSkillList attributes/>
    <ItemAliasList ... ItemAliasList attributes />
   .
   .
 </Item>

After extending the Item header, the getItemDetails() API can output the following XML:

<?xml version="1.0" encoding="UTF-8"?>
 <Item .. Item attributes >
   <PrimaryInformation .... PrimaryInformation attributes />
   <Extn ExtnAltQty="200408201034469490" ..... extnded attributes />
   <YFSPersonInfo .... PersonInfoKey="200408201034469490" ...../>
   <ItemServiceSkillList .. ItemServiceSkillList attributes/>
   <ItemAliasList ... ItemAliasList attributes />
   .
   .
 </Item>
Note: Foreign Key variables for the extended column appear as a PersonInfoKey attribute of the YFSPersonInfo element. The relationship can be validated if the extended column and the PersonInfoKey have the same value.

The extended attribute is retrieved from the XMLName attribute of the your_filename.xml file that you edited in the previous sections, when extending a standard table. Place your extended templates in the install_dir/extensions/global/template/api directory.

Note: Template files must be encoded in UTF-8 format.