Flight with the given id.
+ *
+ * @param id the flight identifier
+ * @return the flight
+ * @throws NoSuchFlightException if a flight with the specified flight iddoes not exist
+ */
+ Flight getFlight(Long id) throws NoSuchFlightException;
+
/**
* Returns a list of Flight objects that fall within the specified criteria.
*
@@ -37,25 +49,27 @@ public interface AirlineService {
* @param departureDate the date of the flights
* @param serviceClass the desired service class level. May be null
* @return a list of flights
- * @see org.springframework.ws.samples.airline.domain.Flight
*/
- List getFlights(String fromAirportCode, String toAirportCode, LocalDate departureDate, ServiceClass serviceClass);
+ ListFrequentFlyer is specified, the first and last name are looked up in the database.
+ * username. If a {@link FrequentFlyer} is specified, the first and last name are looked up in the database.
*
* @param flightNumber the number of the flight to book
* @param departureTime the departure time of the flight to book
- * @param passengers the list of passengers for the flight to book. Can be either Passengers with a
- * first and last name, or FrequentFlyers with a username.
+ * @param passengers the list of passengers for the flight to book. Can be either {@link Passenger} objects with
+ * a first and last name, or {@link FrequentFlyer} objects with a username.
* @return the created ticket
* @throws NoSuchFlightException if a flight with the specified flight number and departure time does not exist
* @throws NoSeatAvailableException if not enough seats are available for the flight
* @see org.springframework.ws.samples.airline.domain.Passenger
* @see org.springframework.ws.samples.airline.domain.FrequentFlyer
*/
- Ticket bookFlight(String flightNumber, DateTime departureTime, List passengers)
+ Ticket bookFlight(String flightNumber, DateTime departureTime, List<GetFlightsRequest> payload.
+ *
+ * @param request the JAXB2 representation of a <GetFlightsRequest>
+ */
+ @PayloadRoot(localPart = "GetFlightsRequest", namespace = NAMESPACE)
+ public GetFlightsResponse getFlights(GetFlightsRequest request) throws DatatypeConfigurationException {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Received GetFlightsRequest '" + request.getFrom() + "' to '" + request.getTo() + "' on " +
+ request.getDepartureDate());
+ }
+ List<BookFlightRequest> payload.
+ *
+ * @param request the JAXB2 representation of a <BookFlightRequest>
+ * @return the JAXB2 representation of a <BookFlightResponse>
+ */
+ @PayloadRoot(localPart = "BookFlightRequest", namespace = NAMESPACE)
+ public JAXBElement