Airline SOAP API Documentation
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 frequent flyer mileage inquiries.
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 Name:
Airline
This port type defines the operations available in the Airline SOAP API.
Operations
1. GetFlights
Retrieves available flights between specified airports on a given date.
- Request Message:
GetFlightsRequest - Response Message:
GetFlightsResponse
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
| Element | Type | Description |
|---|---|---|
flight | Flight | List of available flights |
2. BookFlight
Books a flight for one or more passengers.
- Request Message:
BookFlightRequest - Response Message:
BookFlightResponse
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 typeName(includesfirstandlastelements)username: of typeFrequentFlyerUsername
BookFlightResponse
Returns a Ticket containing booking details.
3. GetFrequentFlyerMileage
Retrieves the total mileage for a frequent flyer.
- Request Message:
GetFrequentFlyerMileageRequest - Response Message:
GetFrequentFlyerMileageResponse
GetFrequentFlyerMileageRequest
| Element | Type | Description | Required |
|---|---|---|---|
username | string | Frequent flyer's username | Yes |
GetFrequentFlyerMileageResponse
| Element | Type | Description |
|---|---|---|
mileage | int | Total accrued mileage |
Data Types
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
| Element | Type | Description |
|---|---|---|
code | AirportCode | Airport code (e.g., "JFK") |
name | string | Airport name |
city | string | City where airport is located |
Ticket
| Element | Type | Description |
|---|---|---|
id | long | Ticket identifier |
issueDate | date | Date ticket was issued |
passengers | Passengers | List of passengers |
flight | Flight | Flight details |
Name
| Element | Type | Description |
|---|---|---|
first | string | First name |
last | string | Last name |
Enumerations
ServiceClass
economybusinessfirst
FlightNumber
A string matching the pattern [A-Z][A-Z][0-9][0-9][0-9][0-9] (e.g., "AA1001").
AirportCode
A string matching the pattern [A-Z][A-Z][A-Z] representing a three-letter airport code (e.g., "JFK").
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 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.