Running the message routing sample

This topic includes instructions for running the sample. It also includes the expected output message, so that you can confirm the sample has worked. For more information on the input message and the XSL stylesheet used in this sample, see Read about the sample.

Their are two main steps to running the XMLT sample:

  1. Putting the test message to the input queue.
  2. Getting the transformed message from the output queue.

Putting the test message to the input queue

  1. Open the test message enqueue file called XMLT_Sample_Msg.enqueue.
  2. Click Write to queue. A message is sent to the XMLT_IN queue. The message flow transforms the message and outputs it to the XMLT_OUT queue.

Getting the transformed message from the output queue

  1. Click the dequeue icon on the toolkit toolbar:

    location of the dequeue program

  2. Enter the queue manager name: WBRK6_DEFAULT_QUEUE_MANAGER
  3. Enter the queue name: XMLT_OUT
  4. Click Read From Queue

Understanding the results

The XMLTransformation node uses the deployed XSL stylesheet to transform the input test message according to a set of rules. The resulting XML message read from the output queue should look like:

<?xml version="1.0" encoding="UTF-8"?>
<SaleEnvelope>
 <SaleList>
  <Statement Type="Monthly" Style="Full">
   <Customer>
    <Initials>KA</Initials>
    <Name>Braithwaite</Name>
    <Balance>00.50</Balance>
   </Customer>
   <Purchases>
    <Article>
     <Desc>Twister</Desc>
     <Cost>0.48</Cost>
     <Qty>01</Qty>
    </Article>
    <Article>
     <Desc>The Times Newspaper</Desc>
     <Cost>0.32</Cost>
     <Qty>01</Qty>
    </Article>
   </Purchases>
   <Amount Currency="Sterling">0.8</Amount>
  </Statement>
  <Statement Type="Monthly" Style="Full">
   <Customer>
    <Initials>TJ</Initials>
    <Name>Dunnwin</Name>
    <Balance>81.84</Balance>
   </Customer>
   <Purchases>
    <Article>
     <Desc>The Origin of Species</Desc>
     <Cost>35.74</Cost>
     <Qty>02</Qty>
    </Article>
    <Article>
     <Desc>Microscope</Desc>
     <Cost>57.92</Cost>
     <Qty>01</Qty>
    </Article>
   </Purchases>
   <Amount Currency="Euros">129.41</Amount>
  </Statement>
 </SaleList>
</SaleEnvelope>

Main Page icon   Back to sample home