Before you start you must have imported and deployed the Video Rental sample. When you imported the sample there might have been some warnings relating to .msgflow files. These warnings are database related and do not affect the running of the sample. You might also receive a warning in the Toolkit about validation, this warning is message set related and does not affect the running of the sample.
This topic explains how to put the CWF, XML, and TDS input messages through the Video message flow. It also explains how to check that the sample works and that you received the correct result.
If you encounter any problems when you run the sample, see Resolving problems when running samples in the WebSphere Message Broker documentation.
To run the sample, you must put messages on the input queues and get messages from the output queue. Start by putting one of the messages on the corresponding input queue, as indicated in the following table. If you have set up the sample correctly, a reply message is put on the VIDEO_OUT queue. You can then repeat the process for the other messages.
File | Input queue |
---|---|
videomsgcwf.mbtest | VIDEO_CWF_IN |
videomsgxml.mbtest | VIDEO_XML_IN |
videomsgtds.mbtest | VIDEO_TDS_IN |
To put a message on the relevant queue:
To get a message from the VIDEO_OUT queue:
When you put a message through the message flow, you receive a message on the VIDEO_OUT queue. The following transformation has taken place in the message:
In the three input messages, the ID field contains a single character representing the type of identifier supplied by the customer:
The IdGroup field in the message indicates the number of the passport, driving license, or credit card. To find out why the messages are organized in this way, see Structure of the message model.
In the XML and TDS messages, the type of identifier used is a passport. In the CWF message, the identifier is a credit card. If you want to see the effect of changing the type of identifier used to a driving license, make the changes shown in the following table, and then put the messages on the corresponding input queues as usual. To edit the files in the workbench, double-click the file in the Broker Development view. The file opens in the editor view. When you make the changes, take the following into account:
File name | Old value | New value |
---|---|---|
videomsgxml.mbtest | <ID>P</ID> | <ID>D</ID> |
<PassportNo>J123456TT</PassportNo> | <DrivingLicenseNo>xxxxxx</DrivingLicenseNo> | |
videomsgtds.mbtest | &ID:P&PassportNo:J123456TT | &ID:D&DrivingLicenseNo:xxxxxx |
videomsgcwf.mbtest | C (between Salisbury and J123456TT) | D |
To explore how the CWF parser handles unresolved choices, you can trace the message flow. To find out more about unresolved choice handling in this sample, see About the Video Rental message set.
To explore how unresolved choice handling works:
(0x0100001B):MRM = ( (0x01000013):Name = ( (0x0300000B):LastName = 'Bloggs ' (0x0300000B):Title = 'Mr ' (0x0300000B):FirstName = 'Fred ' ) (0x01000013)http://www.ibm.com/AddressDetails:Address = ( (0x0300000B):HouseNo = 12 (0x0300000B):Street = 'Willow Avenue ' (0x0300000B):Town = 'Salisbury ' ) (0x0300000B):ID = 'C' (0x0300000B):CreditCardNo = 'J123456TT ' (0x01000013)http://www.ibm.com/BorrowedDetails:Borrowed = ( (0x0300000B):VideoTitle = 'Fast Cars ' (0x0300000B):DueDate = TIMESTAMP '2003-05-23 00:00:00' (0x0300000B):Cost = 3.00 ) (0x01000013)http://www.ibm.com/BorrowedDetails:Borrowed = ( (0x0300000B):VideoTitle = 'Cut To The Chase ' (0x0300000B):DueDate = TIMESTAMP '2003-05-23 00:00:00' (0x0300000B):Cost = 3.75 ) (0x0300000B):Magazine = TRUE