The flight example demonstrates the use of XSL to transform requests and replys to and from a custom DBMS component. This example assumes that a custom component exists whose functionality is going to be utilized in a Component-X application. For the purpose of this demo, a QBE component represents the custom DBMS component. QBE was an earlier effort to provide DBMS access within Component-X.
The example is very similar in its construction and the components used to the department example. The main part of the application is the flightApp component that connects together the IO and routing components to the processing components using interfaces.
This example demonstrates a different method of routing various input documents than used in the contacts example. This application uses router components to send the input document to the correct component for processing. The incoming document is transformed into a query using an XSL transformation and then sent to the qbe component that executes the query and returns the results. The results are then transformed using another XSL transformation to return the final result. This example is useful to examine how XSL may be used within ComponentX and how routing may be used.
First load up the project using the open project command and the open flight.cxp in the examples\flight directory. There is a sample request document with the sample called flightRequest.xml. If you open the flightApp component and then flightServer component and open the input and output ports of the serverSocket and then load the test document into the input (called the request port) of the application you will receive a reply document containing a list of flight information on the output port.
To learn more about how to load and run applications using ComponentX review the tutorial which can be accessed from the readme.