AMADEUS API - XML-DOM - COM/NT

   Client User's Guide


What is an Amadeus API conversation ?
Overview
   - What is an API conversation ?
   - Conversation Management for an API Application User
   - Conversation Management for an API Application Provider
Implementation Guidelines and Code Samples
   - for an API Application User
   - for an API Application Provider

One function for all transactions

The COM API interface is document based. It takes as input an XML document (see XML Introduction below) and an XML Document is returned to it. The name of the document specifies the functionality you want to use.

This API has eigth functions (e.g OpenConversation, CloseConversation, SendAndReceive etc...). There is not a separate function for each host feature, instead there is one generic function, SendAndReceive(). This function is used to send and receive any request to the Amadeus Reservation System using a TCP/IP transport layer.

The document that you build is a COM object provided by Microsoft through their XML-DOM library  MSXML.DLL (see DOM introduction below).

The common flow to using the Amadeus COM API could be:

  • Build a XML-DOM document
  • Send the document
  • Display the reply

The COM API could be easily used in Visual Basic applications, Web based applications or ASP scripts (Internet Information Server). It has been optimised to fit well in any of these environments.


What is XML ?

Extensible Markup Language (XML) is a meta-markup language that provides a format for describing structured data. This facilitates more precise declarations of content and more meaningful search results. In addition, XML enables a new generation of Web-based applications.

XML document looks like this:

<Air_Availability_Query>
    <FromCity>MIA</FromCity>
    <ToCity>CDG</ToCity>
</Air_Availability_Query>

What is DOM ?

The Document Object Model is essentially an Application Program Interface (API) that defines a standard way in which developers can interact with the elements of the XML structured tree. It allows you to access and manipulate the nodes within an XML document. This Microsoft DOM library provides functions for querying, serializing, and persisting XML data.

The XML language and the Document Object Model are W3C recommendations, i.e a worlwide standard approved by the software leaders such as Microsoft, Sun, IBM...

Displaying XML-Based Data in HTML

An XML document does not by itself specify whether or how its information should be displayed. The XML data merely contains the facts (such as who ordered which books at which prices). HTML is an ideal display language for presenting this data to an end user. For example, a user of an reservation application can visit a Web page to find a list of available flights. From the server, the individual data records are expressed in XML. However, the data is presented to the employee through an HTML page. To construct this Web page, either the Web server or the Web browser will need to convert the XML data records into an HTML presentation, such as a table.

Extensible Stylesheet Language (XSL) can add even greater power to this process. An XSL style sheet contains instructions for how to pull information out of an XML document and transform it into another format, such as HTML. The transformation of XML into formats, such as HTML, is done in a declarative way, making it often easier and more accessible than through scripting. In addition, XSL uses XML as its syntax, freeing XML authors from having to learn another markup language.


Transforming XML-based data to display using XSL


Querying data

XSL, and the XSL Pattern language that is part of XSL, provide a measure for querying XML, shaping extracted data including sorting and filtering.

XSL Patterns are a simple and concise syntax for identifying nodes in an XML document, based on the node's type, name, content, and context in relation to other nodes in the tree.

For example xmlDOMDocument.SelectNodes("//Flights") returns a collection of nodes named Flights wherever they are in the tree.