use of de.vitero.schema.booking.GetBookingListByUserAndCustomerInFutureRequest in project OpenOLAT by OpenOLAT.
the class ViteroManager method getBookingInFutureByUserId.
protected List<Booking_Type> getBookingInFutureByUserId(int userId) throws VmsNotAvailableException {
try {
GetBookingListByUserAndCustomerInFutureRequest request = new GetBookingListByUserAndCustomerInFutureRequest();
request.setUserid(userId);
request.setCustomerid(viteroModule.getCustomerId());
request.setTimezone(viteroModule.getTimeZoneId());
Bookinglist bookingList = getBookingWebService().getBookingListByUserAndCustomerInFuture(request);
return bookingList.getBooking();
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
case userDoesntExist:
log.error("The user does not exist!", f);
break;
case invalidAttribut:
log.error("ids <= 0!", f);
break;
case invalidTimezone:
log.error("Invalid time zone!", f);
break;
default:
logAxisError("Cannot get booking in future for user: " + userId, f);
}
return null;
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
log.error("Cannot get booking in future for custom: " + userId, e);
return null;
}
}
use of de.vitero.schema.booking.GetBookingListByUserAndCustomerInFutureRequest in project openolat by klemens.
the class ViteroManager method getBookingInFutureByUserId.
protected List<Booking_Type> getBookingInFutureByUserId(int userId) throws VmsNotAvailableException {
try {
GetBookingListByUserAndCustomerInFutureRequest request = new GetBookingListByUserAndCustomerInFutureRequest();
request.setUserid(userId);
request.setCustomerid(viteroModule.getCustomerId());
request.setTimezone(viteroModule.getTimeZoneId());
Bookinglist bookingList = getBookingWebService().getBookingListByUserAndCustomerInFuture(request);
return bookingList.getBooking();
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
case userDoesntExist:
log.error("The user does not exist!", f);
break;
case invalidAttribut:
log.error("ids <= 0!", f);
break;
case invalidTimezone:
log.error("Invalid time zone!", f);
break;
default:
logAxisError("Cannot get booking in future for user: " + userId, f);
}
return null;
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
log.error("Cannot get booking in future for custom: " + userId, e);
return null;
}
}
Aggregations