Wednesday, August 13, 2014

View BOD messages in toolkit

To view the BOD request/response XML data, the TCP/IP Monitor in WebSphere Commerce Toolkit is used.
Configuration must be made before enabling the monitor.

For example, the BOD data for the Order service:

  1. The {toolkit_install_dir}\xml\config directory contains a set of com.ibm.commerce.* folders, which contain configuration files that specify the binding information of the corresponding service. For example, to monitor the BOD data for the Order service, com.ibm.commerce.order\wc-component-client.xml should be modified where the TCP/IP monitor can catch the XML data by listening on a port .
Replace the following code in the original wc-component-client.xml:
bindingImpl="com.ibm.commerce.foundation.internal.client.services.invocation.impl.LocalEJBInvocationBindingImpl">
<_config:property name="jndiName" value="ejb/com/ibm/commerce/order/facade/server/OrderLocalFacadeHome" />

with the following code:
bindingImpl="com.ibm.commerce.foundation.internal.client.services.invocation.impl.J2SEWebServiceInvocationBindingImpl">
<_config:property name="url" value="http://localhost:81/webapp/wcs/component/order/services/OrderServices" />

The target host machine is localhost.
Port 81 is the port that the TCP/IP monitor will listen on for BOD data.

2. Restart your WAS server.

3. In your toolkit, navigate to Window > Show View > Other...
Select the TCP/IP Monitor view.
(in the RAD6-based toolkit, the TCP/IP Monitor view is located in Debug)

4. With the TCP/IP Monitor open, click the down-arrow icon, located in the top right corner in the view, and select "Properties...".

5. In the opened monitors window, select "Add..."

6. Change the monitoring port to 81 (as previously specified in the configuration file)

7. Type the host name of the host machine or "localhost" if it is the local machine.

8. "Port: " is the port number that the web 2.0 store uses on the host machine.
80 is the default port number for the web 2.0 store running from a toolkit.
8007 is the default port number using runtime.

9. Select HTTP for the communication type.

10. Click OK.

11. Select the new created monitor from the list, and click Start.

When an order service call is invoked as the store is browsed, the request BOD data is shown on the left side of the TCP/IP Monitor view, and the response BOD data is shown on the right side of the view.


Note:
After using the TCP/IP monitor, you should stop the monitor from continuing to listen on the port and undo the changes made to the wc-component-client.xml file.

No comments:

Post a Comment