use of de.vitero.schema.booking.GetBookingListByDateRequest in project OpenOLAT by OpenOLAT.
the class ViteroManager method getBookingByDate.
public List<ViteroBooking> getBookingByDate(Date start, Date end) throws VmsNotAvailableException {
try {
Booking bookingWs = getBookingWebService();
GetBookingListByDateRequest dateRequest = new GetBookingListByDateRequest();
dateRequest.setStart(format(start));
dateRequest.setEnd(format(end));
dateRequest.setTimezone(viteroModule.getTimeZoneId());
dateRequest.setCustomerid(viteroModule.getCustomerId());
Bookinglist bookingList = bookingWs.getBookingListByDate(dateRequest);
List<Booking_Type> bookings = bookingList.getBooking();
return convert(bookings);
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
default:
logAxisError("Cannot get the list of bookings by date.", f);
}
return Collections.emptyList();
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
return Collections.emptyList();
}
}
use of de.vitero.schema.booking.GetBookingListByDateRequest in project openolat by klemens.
the class ViteroManager method getBookingByDate.
public List<ViteroBooking> getBookingByDate(Date start, Date end) throws VmsNotAvailableException {
try {
Booking bookingWs = getBookingWebService();
GetBookingListByDateRequest dateRequest = new GetBookingListByDateRequest();
dateRequest.setStart(format(start));
dateRequest.setEnd(format(end));
dateRequest.setTimezone(viteroModule.getTimeZoneId());
dateRequest.setCustomerid(viteroModule.getCustomerId());
Bookinglist bookingList = bookingWs.getBookingListByDate(dateRequest);
List<Booking_Type> bookings = bookingList.getBooking();
return convert(bookings);
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
default:
logAxisError("Cannot get the list of bookings by date.", f);
}
return Collections.emptyList();
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
return Collections.emptyList();
}
}
Aggregations