Running the XMLT 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. In the Message Brokers Toolkit, switch to the Broker Application Development perspective.
  2. In the Broker Development view, expand the XMLT Sample Message Flows project.
  3. Double click XMLT_Sample_Msg.mbtest to open the file in the Test Client.
  4. In the Test Client click Enqueue.
  5. Click Send Message. 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. In the Test Client click Dequeue.
  2. Click Get Message to read a message from the XMLT_OUT 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>

Back to sample home