WebSphere Message Brokers
File: ar25225_
Writer: Cerys Giddings

Task topic

This build: July 31, 2007 21:36:15

Scenario F: Updating the value of a message element

Before you start:
  1. Create the appropriate message model, either by using the tooling or by importing the message structure files (for example, C header or XML Schema Definition files).
  2. Create a message flow that has the following structure:
    MQInput> Mapping node> MQOutput
This scenario demonstrates how to update the value of a message element. The message model used in this example is:
simple		(message)
		int	(xsd:int)
		str	(xsd:str)
  1. Switch to the Broker Application Development perspective.
  2. Right-click the Mapping node and click Open Map.
  3. Select simple as the source message and the target message and click OK.
  4. In the connection pane, open the source and target trees by clicking the addition (+) icons.
  5. Open the simple trees on both sides in the same way.
  6. Select int in the Message Mapping editor Source pane, and drag it onto int in the Target pane. A line joins them.
  7. Select str in the Message Mapping editor Source pane and drag it onto str in the Target pane. A line joins them.
  8. In the Map Script | Value table, open the tree by clicking the $target + box
  9. Open the simple tree in the same way; both int and str have values (for example, int $source/simple/int str $source/simple/str.
  10. Select the value for int. The value appears in the Expression Editing pane.
  11. Edit the value so that it is: $source/simple/int + 1 and press Enter. The value in the table is updated (this increments the input value).
  12. Select the value for str and edit it so that it is: esql:upper($source/simple/str), and press Enter. The value in the table is updated (this converts the input value to upper case).
  13. Save the mapping by clicking File> Save.
You have completed this scenario. The input and output messages have the same structure and format, but the element values have been modified.
Related reference
Message mappings
Notices | Trademarks | Downloads | Library | Support | Feedback

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

ar25225_ This topic's URL is: