To change any properties in the component configuration
file (wc-component.xml) for REST, you must create
a customized version of the file in a new folder. The customized version
of the file must contain only the changed properties.
Procedure
- Open HCL Commerce Developer and switch to the Enterprise Explorer
view.
- Create a custom component configuration file (wc-component.xml),
if one does not already exist:
- Navigate to the following path:
workspace_dir\WC\xml\config\
- In the config folder, create a
new com.ibm.commerce.component_name-ext folder
so the path looks like this:
workspace_dir\WC\xml\config\com.ibm.commerce.component_name-ext\
Where component_name is
the name of the component. For example. catalog or foundation.
If
this folder already exists and it contains a customized version of
the wc-component.xml file, then open the file
and skip to step 4.
- Create an empty wc-component.xml file
in the com.ibm.commerce.component_name-ext folder.
This file is your custom wc-component.xml file.
- Add the basic XML elements required for your custom wc-component.xml file:
- Open your empty custom wc-component.xml file
in an XML editor.
- Copy the following code into the file:
<?xml version="1.0" encoding="UTF-8"?>
<_config:DevelopmentComponentConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component.xsd "
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:extendedconfiguration>
</_config:extendedconfiguration>
</_config:DevelopmentComponentConfiguration>
- Add the XML for any properties that you
want to change to your custom wc-component.xml file:
- Navigate to the default component configuration file
at the following path:
workspace_dir\WC\xml\config\com.ibm.commerce.component_name\wc-component.xmlImportant: Never change properties
directly in this file because your changes will be overwritten
with future HCL software updates.
- Copy the XML elements for the properties you want to
change from the default component configuration file to your custom wc-component.xml file.
Insert the copied XML elements after the
<_config:extendedconfiguration>
element.
Even though you are copying only certain elements, you must
maintain the XML hierarchy for those elements in the file. For example,
if you want to change the property defined in a specific <_config:property>
element,
you must retain the parent and ancestor elements of the <_config:property>
element,
but you can delete all the siblings if you are not changing them.
See the example at the end of this topic.
- Change the values for the copied properties as required.
- Save and close the custom configuration file.
- Test your configuration changes.