About the XML_Reservation input messages

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. Two XML_Reservation input messages are provided because each message can reserve seats on only one flight. 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. See also Structure of the XML_Reservation input messages.

A diagram showing the hierarchy of fields in the XML_Reservation input message.

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, see Working with XML messages in the IBM Integration Bus documentation. See also About the XML_Reservation message flow.

Back to About the Airline Reservations sample