private static Element getRequestDocumentElement(final String requestBody) {
        if (StringUtils.hasText(requestBody)) {
            val document = AbstractSamlObjectBuilder.constructDocumentFromXml(requestBody);
            if (document == null) {
                LOGGER.trace("XML document could not extracted from request body [{}]", requestBody);
                return null;
            }

            val root = document.getRootElement();

            val body = root.getChild("Body", NAMESPACE_ENVELOPE);
            if (body == null) {
                LOGGER.trace("XML document root has no child body element");
                return null;
            }
            return body.getChild("Request", NAMESPACE_SAML1);
        }
        return null;
    }
Gets the request body from the request.

@param request the request
@return the request body
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/authentication/principal/SamlServiceFactory.java