WebSphere Message Brokers
File: ac30420_
Writer: Catherine Tucker

Concept topic

This build: July 31, 2007 21:20:14

Copying message headers using a JavaCompute node

The Modifying Message Class template in the JavaCompute node wizard generates the following code to copy message headers using a JavaCompute node:
public void copyMessageHeaders(MbMessage inMessage, MbMessage outMessage) throws MbException
{
	MbElement outRoot = outMessage.getRootElement();
	MbElement header = inMessage.getRootElement().getFirstChild();

	while(header != null && header.getNextSibling() != null)
	{
		outRoot.addAsLastChild(header.copy());
		header = header.getNextSibling();
	}
}
Related reference
JavaCompute node
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:20:14

ac30420_ This topic's URL is: