The XML_Reservation input messages are supplied so that you can run the XML_Reservation message flow to create reservations that are stored in the database. There are two XML_Reservation input messages because each message can reserve seats on only one flight. So the first message requests seats for four people on one flight, and the second message requests an additional seat on another flight for one of the four passengers.
The two XML_Reservation input messages are identical in their logical structure and vary only in their content.
Input message 1 (reservation1.mbtest) contains the following data:
<Reservation> <FlightDetails> <Number>CA937</Number> <Date>20030525</Date> </FlightDetails> <ListOfPassengers> <PassengerDetails> <FirstName>Mary</FirstName> <LastName>Smith</LastName> <Class>F</Class> </PassengerDetails> <PassengerDetails> <FirstName>Diane</FirstName> <LastName>Rose</LastName> <Class>Y</Class> </PassengerDetails> <PassengerDetails> <FirstName>Debra</FirstName> <LastName>Wiess</LastName> <Class>Y</Class> </PassengerDetails> <PassengerDetails> <FirstName>Atila</FirstName> <LastName>Wiess</LastName> <Class>F</Class> </PassengerDetails> </ListOfPassengers> <Request>M</Request> </Reservation>
Input message 2 (reservation2.mbtest) contains the following data:
<Reservation> <FlightDetails> <Number>BA039</Number> <Date>20030525</Date> </FlightDetails> <ListOfPassengers> <PassengerDetails> <FirstName>Mary</FirstName> <LastName>Smith</LastName> <Class>F</Class> </PassengerDetails> </ListOfPassengers> <Request>S</Request> </Reservation>
Compare these input messages with the model in the following diagram. Although the PassengerDetails element, or field, is represented only once in the hierarchical structure, the number of times that the PassengerDetails field is included in the message depends on the number of people requesting reservations. You can also read a textual description of the message structure.
Look at the ESQL in Creating the XML_Reservation message flow. See how the message flow navigates the message to certain elements in the tree. For example
Body.Reservation.FlightDetails.Date
and
Body.Reservation.ListOfPassengers.PassengerDetails[1]
For more information, read about XML messages in the WebSphere Message Broker documentation. Also take a look at the XML_Reservation message flow.