<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"
        xmlns:tns="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"
        xmlns:types="http://www.springframework.org/spring-ws/samples/airline/schemas/types"
        elementFormDefault="qualified">

    <import namespace="http://www.springframework.org/spring-ws/samples/airline/schemas/types"
            schemaLocation="types.xsd"/>

    <element name="GetFlightsRequest">
        <complexType>
            <all>
                <element name="from" type="types:AirportCode"/>
                <element name="to" type="types:AirportCode"/>
                <element name="departureDate" type="date"/>
                <element name="serviceClass" type="types:ServiceClass" minOccurs="0"/>
            </all>
        </complexType>
    </element>

    <element name="GetFlightsResponse">
        <complexType>
            <sequence>
                <element name="flight" type="types:Flight" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
        </complexType>
    </element>

    <element name="BookFlightRequest">
        <complexType>
            <all>
                <element name="flightNumber" type="types:FlightNumber"/>
                <element name="departureTime" type="dateTime"/>
                <element name="passengers">
                    <complexType>
                        <choice maxOccurs="9">
                            <element name="passenger" type="types:Name"/>
                            <element name="username" type="types:FrequentFlyerUsername"/>
                        </choice>
                    </complexType>
                </element>
            </all>
        </complexType>
    </element>

    <element name="BookFlightResponse" type="types:Ticket"/>

    <element name="GetFrequentFlyerMileageRequest" nillable="true" type="string"/>

    <element name="GetFrequentFlyerMileageResponse" type="int"/>
</schema>