---
title: "Airline SOAP API"
description: "This document provides an overview of the Airline SOAP API defined by the WSDL available at airline.wsdl. The API facilitates operations related to flight information retrieval, flight booking, and..."
url: "https://portal.kongair.dev/apis/airline-soap-api/docs/airline-soap-api"
image: "https://portal.kongair.dev/_og/d/c_Ocean.takumi,title_Airline+SOAP+API,description_~VGhpcyBkb2N1bWVudCBwcm92aWRlcyBhbiBvdmVydmlldyBvZiB0aGUgQWlybGluZSBTT0FQIEFQSSBkZWZpbmVkIGJ5IHRoZSBXU0RMIGF2YWlsYWJsZSBhdCBhaXJsaW5lLndzZGwuIFRoZSBBUEkgZmFjaWxpdGF0ZXMgb3BlcmF0aW9ucyByZWxhdGVkIHRvIGZsaWdodCBpbmZvcm1hdGlvbiByZXRyaWV2YWwsIGZsaWdodCBib29raW5nLCBhbmQuLi4,props_eyJ0aGVtZSI6eyJjb2xvcnMiOnsicHJpbWFyeSI6IiMyQUJEQkIifX19,p_Ii9hcGlzL2FpcmxpbmUtc29hcC1hcGkvZG9jcy9haXJsaW5lLXNvYXAtYXBpIg,s_3gGxQtEv4lHUFn9r.png"
---

# Airline SOAP API Documentation

This document provides an overview of the Airline SOAP API defined by the WSDL available at [airline.wsdl](https://github.com/spring-projects/spring-ws-samples/blob/main/airline/client/airline.wsdl). The API facilitates operations related to flight information retrieval, flight booking, and frequent flyer mileage inquiries.

## [Service Overview](#service-overview)

-   **Service Name**: `AirlineService`
-   **Target Namespace**: `http://www.springframework.org/spring-ws/samples/airline/definitions`
-   **Endpoint URL**: `http://localhost:8080/airline-server/services`

## [Port Type](#port-type)

-   **Port Type Name**: `Airline`  
    This port type defines the operations available in the Airline SOAP API.

## [Operations](#operations)

### [1\. GetFlights](#_1-getflights)

Retrieves available flights between specified airports on a given date.

-   **Request Message**: `GetFlightsRequest`
-   **Response Message**: `GetFlightsResponse`

#### [GetFlightsRequest](#getflightsrequest)

| Element       | Type         | Description                          | Required |
| :------------ | :----------- | :----------------------------------- | :------- |
| from          | AirportCode  | Departure airport code (e.g., "JFK") | Yes      |
| to            | AirportCode  | Arrival airport code (e.g., "LAX")   | Yes      |
| departureDate | date         | Date of departure                    | Yes      |
| serviceClass  | ServiceClass | Class of service (e.g., economy)     | No       |

#### [GetFlightsResponse](#getflightsresponse)

| Element | Type   | Description               |
| :------ | :----- | :------------------------ |
| flight  | Flight | List of available flights |

### [2\. BookFlight](#_2-bookflight)

Books a flight for one or more passengers.

-   **Request Message**: `BookFlightRequest`
-   **Response Message**: `BookFlightResponse`

#### [BookFlightRequest](#bookflightrequest)

| Element       | Type         | Description                     | Required |
| :------------ | :----------- | :------------------------------ | :------- |
| flightNumber  | FlightNumber | Flight number (e.g., "AA1001")  | Yes      |
| departureTime | dateTime     | Scheduled departure time        | Yes      |
| passengers    | Passengers   | List of passengers or usernames | Yes      |

**Passengers** can include up to 9 entries of either:

-   `passenger`: of type `Name` (includes `first` and `last` elements)
-   `username`: of type `FrequentFlyerUsername`

#### [BookFlightResponse](#bookflightresponse)

Returns a `Ticket` containing booking details.

### [3\. GetFrequentFlyerMileage](#_3-getfrequentflyermileage)

Retrieves the total mileage for a frequent flyer.

-   **Request Message**: `GetFrequentFlyerMileageRequest`
-   **Response Message**: `GetFrequentFlyerMileageResponse`

#### [GetFrequentFlyerMileageRequest](#getfrequentflyermileagerequest)

| Element  | Type   | Description               | Required |
| :------- | :----- | :------------------------ | :------- |
| username | string | Frequent flyer's username | Yes      |

#### [GetFrequentFlyerMileageResponse](#getfrequentflyermileageresponse)

| Element | Type | Description           |
| :------ | :--- | :-------------------- |
| mileage | int  | Total accrued mileage |

## [Data Types](#data-types)

### [Flight](#flight)

| Element       | Type         | Description                    |
| :------------ | :----------- | :----------------------------- |
| number        | FlightNumber | Flight number (e.g., "AA1001") |
| departureTime | dateTime     | Scheduled departure time       |
| from          | Airport      | Departure airport details      |
| arrivalTime   | dateTime     | Scheduled arrival time         |
| to            | Airport      | Arrival airport details        |
| serviceClass  | ServiceClass | Class of service               |

### [Airport](#airport)

| Element | Type        | Description                   |
| :------ | :---------- | :---------------------------- |
| code    | AirportCode | Airport code (e.g., "JFK")    |
| name    | string      | Airport name                  |
| city    | string      | City where airport is located |

### [Ticket](#ticket)

| Element    | Type       | Description            |
| :--------- | :--------- | :--------------------- |
| id         | long       | Ticket identifier      |
| issueDate  | date       | Date ticket was issued |
| passengers | Passengers | List of passengers     |
| flight     | Flight     | Flight details         |

### [Name](#name)

| Element | Type   | Description |
| :------ | :----- | :---------- |
| first   | string | First name  |
| last    | string | Last name   |

### [Enumerations](#enumerations)

#### [ServiceClass](#serviceclass)

-   `economy`
-   `business`
-   `first`

#### [FlightNumber](#flightnumber)

A string matching the pattern `[A-Z][A-Z][0-9][0-9][0-9][0-9]` (e.g., "AA1001").

#### [AirportCode](#airportcode)

A string matching the pattern `[A-Z][A-Z][A-Z]` representing a three-letter airport code (e.g., "JFK").

## [Binding](#binding)

-   **Binding Name**: `AirlineSoap11`
-   **Type**: `Airline`
-   **Binding Style**: `document`
-   **Transport**: `http://schemas.xmlsoap.org/soap/http`

Each operation (`BookFlight`, `GetFlights`, `GetFrequentFlyerMileage`) is bound with SOAP actions and uses literal encoding.

## [Service Endpoint](#service-endpoint)

-   **Service Name**: `AirlineService`
-   **Port Name**: `AirlineSoap11`
-   **Binding**: `AirlineSoap11`
-   **SOAP Address Location**: `http://localhost:8080/airline-server/services`

This endpoint is where the Airline SOAP API can be accessed.

---

_Note: The WSDL file provides the formal definition of the SOAP API, including detailed specifications of messages, operations, and data types._