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

ElementTypeDescriptionRequired
fromAirportCodeDeparture airport code (e.g., "JFK")Yes
toAirportCodeArrival airport code (e.g., "LAX")Yes
departureDatedateDate of departureYes
serviceClassServiceClassClass of service (e.g., economy)No

GetFlightsResponse

ElementTypeDescription
flightFlightList of available flights

2. BookFlight

Books a flight for one or more passengers.

  • Request Message: BookFlightRequest
  • Response Message: BookFlightResponse

BookFlightRequest

ElementTypeDescriptionRequired
flightNumberFlightNumberFlight number (e.g., "AA1001")Yes
departureTimedateTimeScheduled departure timeYes
passengersPassengersList of passengers or usernamesYes

Passengers can include up to 9 entries of either:

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

BookFlightResponse

Returns a Ticket containing booking details.

3. GetFrequentFlyerMileage

Retrieves the total mileage for a frequent flyer.

  • Request Message: GetFrequentFlyerMileageRequest
  • Response Message: GetFrequentFlyerMileageResponse

GetFrequentFlyerMileageRequest

ElementTypeDescriptionRequired
usernamestringFrequent flyer's usernameYes

GetFrequentFlyerMileageResponse

ElementTypeDescription
mileageintTotal accrued mileage

Data Types

Flight

ElementTypeDescription
numberFlightNumberFlight number (e.g., "AA1001")
departureTimedateTimeScheduled departure time
fromAirportDeparture airport details
arrivalTimedateTimeScheduled arrival time
toAirportArrival airport details
serviceClassServiceClassClass of service

Airport

ElementTypeDescription
codeAirportCodeAirport code (e.g., "JFK")
namestringAirport name
citystringCity where airport is located

Ticket

ElementTypeDescription
idlongTicket identifier
issueDatedateDate ticket was issued
passengersPassengersList of passengers
flightFlightFlight details

Name

ElementTypeDescription
firststringFirst name
laststringLast name

Enumerations

ServiceClass

  • economy
  • business
  • first

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.