use of de.vitero.schema.booking.DeleteBookingResponse in project openolat by klemens.
the class ViteroManager method deleteBooking.
public boolean deleteBooking(ViteroBooking vBooking) throws VmsNotAvailableException {
try {
DeleteBookingRequest deleteRequest = new DeleteBookingRequest();
deleteRequest.setBookingid(vBooking.getBookingId());
DeleteBookingResponse response = getBookingWebService().deleteBooking(deleteRequest);
BigInteger state = response.getDeletestate();
deleteGroup(vBooking);
deleteProperty(vBooking);
return state != null;
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
case bookingDoesntExist:
case bookingDoesntExistPrime:
{
deleteGroup(vBooking);
deleteProperty(vBooking);
// ok, vms deleted, group deleted...
return true;
}
default:
{
logAxisError("Cannot delete a booking.", f);
}
}
return false;
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
log.error("Cannot delete a booking.", e);
return false;
}
}
use of de.vitero.schema.booking.DeleteBookingResponse in project OpenOLAT by OpenOLAT.
the class ViteroManager method deleteBooking.
public boolean deleteBooking(ViteroBooking vBooking) throws VmsNotAvailableException {
try {
DeleteBookingRequest deleteRequest = new DeleteBookingRequest();
deleteRequest.setBookingid(vBooking.getBookingId());
DeleteBookingResponse response = getBookingWebService().deleteBooking(deleteRequest);
BigInteger state = response.getDeletestate();
deleteGroup(vBooking);
deleteProperty(vBooking);
return state != null;
} catch (SOAPFaultException f) {
ErrorCode code = handleAxisFault(f);
switch(code) {
case bookingDoesntExist:
case bookingDoesntExistPrime:
{
deleteGroup(vBooking);
deleteProperty(vBooking);
// ok, vms deleted, group deleted...
return true;
}
default:
{
logAxisError("Cannot delete a booking.", f);
}
}
return false;
} catch (WebServiceException e) {
if (e.getCause() instanceof ConnectException) {
throw new VmsNotAvailableException();
}
log.error("Cannot delete a booking.", e);
return false;
}
}
Aggregations