Running the PHPCompute Node sample

This topic includes instructions for running the PHPCompute node sample. It also includes the expected output message, to help you verify that the sample has run successfully.

If you encounter any problems when you run the sample, see Resolving problems when running samples in the WebSphere Message Broker documentation.

Running the sample

To run the sample:

  1. In the Broker Development view, expand the Message Broker project PHPComputeFlow. Open the Flow Test called PHPComputeTransform.mbtest.
  2. Click Send Message. A message is sent to the PHPCOMPUTE.TRANSFORM.IN queue.
    The flow processes the message and an output message in placed on the PHPCOMPUTE.TRANSFORM.OUT queue. The editor displays the received message.
  3. Compare the received message with the expected output message.

Expected output message

The output message for the sample should have the following format:

<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.80</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