throw new WebApplicationException(500);
}
log.error(ex.getMessage());
log.debug(ex);
if (ex instanceof DispositionReportFaultMessage) {
DispositionReportFaultMessage dr = (DispositionReportFaultMessage) ex;
if (dr.getFaultInfo() == null) {
throw new WebApplicationException(500);
}
if (dr.getFaultInfo().countainsErrorCode(UDDIErrorHelper.lookupErrCode(UDDIErrorHelper.E_AUTH_TOKEN_EXPIRED))) {
throw new WebApplicationException(ex, 401);
}
if (dr.getFaultInfo().countainsErrorCode(UDDIErrorHelper.lookupErrCode(UDDIErrorHelper.E_AUTH_TOKEN_REQUIRED))) {
throw new WebApplicationException(ex, 401);
}
if (dr.getFaultInfo().countainsErrorCode(UDDIErrorHelper.lookupErrCode(UDDIErrorHelper.E_FATAL_ERROR))) {
throw new WebApplicationException(ex, 500);
}
}
throw new WebApplicationException(ex, 400);
}