protected WebBasedRegisteredService getRegisteredServiceFromRequest(final RequestContext requestContext, final String entityId) {
        val service = this.serviceFactory.createService(entityId);
        var registeredService = (WebBasedRegisteredService) servicesManager.findServiceBy(service);
        if (registeredService == null) {
            val currentService = WebUtils.getService(requestContext);
            LOGGER.debug("Entity id [{}] not found in the registry. Fallback onto [{}]", entityId, currentService);
            registeredService = (WebBasedRegisteredService) servicesManager.findServiceBy(currentService);
        }
        LOGGER.debug("Located service definition [{}]", registeredService);
        return registeredService;
    }
Load saml metadata into request context.

@param requestContext    the request context
@param entityId          the entity id
@param registeredService the registered service
support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/mdui/web/flow/SamlMetadataUIParserAction.java