@GetMapping(path = WSFederationConstants.ENDPOINT_FEDERATION_METADATA)
    @Operation(summary = "Get WS-Federation metadata")
    public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
        try {
            response.setContentType(MediaType.TEXT_HTML_VALUE);
            val out = response.getWriter();
            val metadata = WSFederationMetadataWriter.produceMetadataDocument(casProperties);
            out.write(DOM2Writer.nodeToString(metadata));
        } catch (final Exception ex) {
            LoggingUtils.error(LOGGER, "Failed to get metadata document", ex);
            response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        }
    }
Get Metadata.

@param request  the request
@param response the response
@throws Exception the exception
support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/metadata/WSFederationMetadataController.java