HCL Commerce allows you to extend the Listener for
IBM MQ (formally transport adapter) to process additional messages.
About this task
Adding messages involves doing the following:
Creating an XML template of the message.
Mapping the message to a controller command.
To do this, you will need to have an advanced knowledge of XML, and of the HCL Commerce controller commands. If your message requires you to create a new controller command, you will
also need to have an advanced knowledge of the HCL Commerce database schema, and Java
programming.
Procedure
Create a DTD file to be used for parsing the inbound message and put it the following
directory, workspace_dir/wc/xml/messaging
Add it to the tag of Messaging attribute, ECInboundMessageDtdFiles,
in the HCL Commerce configuration file:
Create a mapping file to map the message content to the command name and needed parameters in
the user message template file. The initial template can be found in the following directory
workspace_dir/WC/xml/messaging/user_template.xml
To add new messages, create a new controller command (interface and implementation) to execute
the needed business logic.
If you are overriding existing command implementation, add or update the corresponding row in
the CMDREG table, and assign a proper class name mapping to the correct interface name. If a
response is required, do the following:
For HCL Commerce Version 9.0.0.x installations: Add a
forward view as well for devicefmt_id of -2000. For example,
If the site is under development, you can add the DebugMode="true"
attribute to the Messaging tag. Any changes in the DTD files will
be loaded during the next inbound message. Step 8 will be required
if the DTD was first added to the DTD file list above.
Use WebSphere Application Server Administration Console to update the EAR and the Stores.war
file.
Notes:
The NewCreation.jsp generates the response message. This JSP file should be
updated using the WebSphere Administration Console to the
WC_eardir/Stores.war directory.
If the default directory "messaging" is not used, additional directory can be created relative
to WC_eardir/xml. At runtime, WAS classloader will attempt
to load these files by pre-pending this directory "messaging" or the newly created directory to the
DTDs or mapping template file before loading. By default, XML configuration directory
is added to the application's classpath. Any new directory under this XML configuration directory
can be loaded by the classloader.