private static ValidationResponseType getValidationResponseType(final HttpServletRequest request,
                                                                    final WebApplicationService service) {
        val format = request.getParameter(CasProtocolConstants.PARAMETER_FORMAT);
        final Function<String, ValidationResponseType> func = FunctionUtils.doIf(StringUtils::isNotBlank,
            t -> ValidationResponseType.valueOf(t.toUpperCase(Locale.ENGLISH)),
            __ -> service != null ? service.getFormat() : ValidationResponseType.XML);
        return func.apply(format);
    }
Gets validation response type.

@param request the request
@param service the service
@return the validation response type
support/cas-server-support-validation-core/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java