Configure the web feed utility
To configure the web feed utility, configure the Data Load utility, and create a configuration file that conforms to the Web-Feed-config.xsd schema.
Before beginning
To create a web feed configuration file, see the sample configuration in the following directory:
WCDE_installdir/samples/DataLoad/Content/WebFeed/sample-Web-Feed-config.xml.
The configuration file conforms to the following schema:
WCDE_installdir/workspace/xml/config/xsd/Web-Feed-config.xsd
Procedure
- Open your web feed configuration file.
- Define the data load configuration files to use:
- Locate the following line of code:
<config:dataLoadConfigFile generate="true" envFileLocation="test-dataload-env. xml">/temp/wc-dataload-config.xml</config:dataLoadConfigFile>
- Ensure that the dataLoadConfigFile element has been set appropriately to generate or not to generate the data load configuration files. We can either allow the utility to generate the data load configuration files, or have the utility use the configuration files predefined by you. Attributes are:
- generate
- true
- Generate the data load configuration files. Use this value to generate the data load configuration files in the development environment.
- false
- Use existing data load configuration files. Use this value in a production environment so that the configuration files generated in the development environment are used.
- envFileLocation
- The location of the data load environment configuration file. The path can either be relative to the path of the data load configuration file, or an absolute path.
If the generate attribute is set to true, meaning the data load configuration files are being generated, then the environment configuration file specified in this parameter must exist.
If the generate attribute is set to false, meaning predefined data load configuration files are to be used, then the value of this attribute is ignored and the environment configuration file specified in the data load configuration will be used.
- dataLoadConfigFile
- The name and location of the data load configuration file.
If the generate attribute is set to true, meaning the data load configuration files are being generated, then a data load configuration file with the specified name and location will be generated.
If the generate attribute is set to false, meaning predefined data load configuration files are to be used, then the data load configuration file with the specified name and location will be used.
- Review the scenarios in the file.
The configuration file mainly consists of blocks of code that represent common usage scenarios for the utility. Each scenario has a description and is contained within <config:feedEndPoint> tags. For example, the following scenario connects the utility to a web feed at feedURL using basic authentication. The content from feedURL is stored on the web server in the file path webServerLocation.
<config:feedEndPoint> <config:content> <!--Specify a staticContent element when we want to copy the feed content to a web server (and create attachments). --> <config:staticContent> <config:name>Catalog</config:name> <config:feedURL>http://opencms.in.ibm.com:8080/opencms/opencms/demo_en/today/ TestAtomFeed</config:feedURL> <!--The directory into which content needs to stored. --> <config:webServerLocation webURL = "http://localhost/stores">file:///C:/IBM/ HTTPServer/htdocs/test</config:webServerLocation> <!--User name if the protocol to be used is FTP. This is used when the web server is not on the same physical machine as the WebSphere Commerce Server --> <config:webServerUser>wsUser</config:webServerUser> <!--Password of the FTP user. --> <config:webServerPassword>wsPassword</config:webServerPassword> <config:ftpUser>ftpUser</config:ftpUser> <config:ftpPassword>ftpPassword</config:ftpPassword> <config:tempFileLocation>/temp</config:tempFileLocation> </config:staticContent> </config:content> <config:securityConfiguration> <!--This element must be present when the kind of authentication required to retrieve the web feeds is of type, basic authentication. Meaning, it requires user name and password. --> <config:basicAuth> <!--Username to be used for authentication. --> <config:user>user</config:user> <!--Password to be used for authentication. --> <config:password>afacWLqg1trlbNupQsppiw==</config:password> <!--A security realm, if there is one. A realm determines the scope of security data. A realm is the region to which a security ID or permission applies. --> <config:realm>default</config:realm> </config:basicAuth> <config:SSLConfiguration> <config:trustStore>/test/testconfig/security/CMSTrustStore.kdb</config:trustStore> <config:trustStorePassword>PDdt0gKgfH0=</config:trustStorePassword> </config:SSLConfiguration> </config:securityConfiguration> </config:feedEndPoint>
- If a scenario applies to the site, modify the configuration parameters to suit your requirements. If the scenario does not apply to the site, comment out the scenario. The sample configuration file contains sample configuration for all scenarios.
- staticContentUse to retrieve static content, such as media files or documents, from a web feed.
- URLAttachment
- name
- The name of the content.
- feedURL
- The URL of the web feed.
- managedAssetUsed for files that are uploaded to a managed directory using either the Management Center Assets tool, or the fileloader utility. The uploaded file is referred to as a managed file and can be added to an attachment, such as an image on a product page.
- name
- The name of the content.
- feedURL
- The URL of the web feed.
- managedDirectory
- The directory that contains managed files. Managed directories are created using the Management Center Assets tool.
- allowedTypes
- The types of files that are retrieved from the web feed and stored in the managed directory as a managed file. The following types of files are supported: doc, xls, ppt, ra, rpm, gz, pdf, ps, swf, zip, gtar, tar, wav, gif, jpe, jpg, jpeg, text, txt, mpg, mpeg, mov, avi, qt, jar, png.
- tempFileLocation
- The location of the content on the local file system before it is moved to the managed directory.
- Modify the securityConfiguration section to specify connection details for your content management system.
<config:securityConfiguration> <!--This element must be present when the kind of authentication required to retrieve the web feeds is of type, basic authentication. Meaning, it requires user name and password. --> <config:basicAuth> <!--Username to be used for authentication. --> <config:user>user</config:user> <!--Password to be used for authentication. --> <config:password>afacWLqg1trlbNupQsppiw==</config:password> <!--A security realm, if there is one. A realm determines the scope of security data. A realm is the region to which a security ID or permission applies. --> <config:realm>default</config:realm> </config:basicAuth> <config:SSLConfiguration> <config:trustStore>/test/testconfig/security/CMSTrustStore.kdb</config:trustStore> <config:trustStorePassword>PDdt0gKgfH0=</config:trustStorePassword> </config:SSLConfiguration> </config:securityConfiguration>
- Save and close the file.
Related concepts
Overview of the web feed utility