In this example, you explore the content management
integration feature by uploading an image file published through Atom
feed.
For simplicity, this tutorial uses a web server
to host the Atom feed. Typically, the feed would originate from the
CMS system.
Before you begin
Install WebSphere Commerce Developer Fix Pack 2, or later.
Install WebSphere Commerce Developer Feature Pack 2, or later.
Publish the Madisons starter store
Have access to a web server that is accessible from your WebSphere
Commerce Developer system.
Procedure
Copy the image file under webserver_home/webapp/docs
Create a new atom feed called atom.xml in
the same folder.
Where:
host_name
The fully qualified host name of the machine.
image_name_with_extension
The name of the image with extension.
Restart the web server.
Verify that published atom feed is accessible from the
WebSphere Commerce Server. http://host_name:8080/docs/atom.xml
Configuring WebSphere Commerce toolkit
Procedure
Create a directory, for example: C:\WebSphere\WCToolkit\WC-CMS.
In the directory you created, create a file called Web-feed-config.xml.
This file specifies the feed URL and the type of file to upload.
Open the WCDE_installdir\samples\DataLoad\Catalog\wc-dataload-env.xml file.
Comment or uncomment sections depending on the database that you are
using.
Note: Encrypt the database
user password using the wcs_encrypt.bat utility before adding the
password to the XML file.
<?xml version="1.0" encoding="UTF-8"?>
<_config:DataLoadEnvConfiguration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config xsd/wc-dataload-env.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:BusinessContext storeIdentifier="Madisons" catalogIdentifier="Madisons" />
<_config:Database name="..\db\mall" type="derby" />
<!--for db2,following is a sample for db2,you need to specify the parameters based your env-->
<!--
<_config:Database type="db2" name="mall" user="build" password="xK36ck80s6GCL9+YsULolg=="
server="localhost" port="50000" schema="build" />
-->
<!--for oracle,following is a sample for oracle,you need to specify the parameters based your env-->
<!--
<_config:Database type="Oracle" port="1521" schema="comusr" name="comdb" user="comusr" password="h2Vcc0xwMNpi8Hs0rI1O/w=="
server="localhost" driverType="thin" />
-->
<_config:DataWriter className="com.ibm.commerce.foundation.dataload.datawriter.JDBCDataWriter" />
</_config:DataLoadEnvConfiguration>
Select the Madisons store. Note that the directory structure
you uploaded, /test/images, is displayed. The
image file is also displayed.
From the x list select Attachment.
Go to the last entry in the list, 1225c695-cfb8-4ebb-aaaa-80da344efa6a.
This entry has the same ID as the element value in the feed.
Associate the image with a product.
Use store preview to see the product in the storefront.
Results
You uploaded an image published from an Atom feed. You associated
the image with a product using the Management Center and verified
the results in the Madisons store.