public void encodeSamlResponse(final HttpServletResponse httpResponse,
                                   final HttpServletRequest httpRequest,
                                   final Response samlMessage) throws Exception {
        openSamlConfigBean.logObject(samlMessage);
        val encoder = new CasHttpSoap11Encoder();
        val context = new MessageContext();
        context.setMessage(samlMessage);
        encoder.setHttpServletResponseSupplier(() -> httpResponse);
        encoder.setMessageContext(context);
        encoder.initialize();
        encoder.prepareContext();
        encoder.encode();
    }
Encode response and pass it onto the outbound transport.
Uses {@link CasHttpSoap11Encoder} to handle encoding.

@param httpResponse the http response
@param httpRequest  the http request
@param samlMessage  the saml response
@throws Exception the exception in case encoding fails.
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/Saml10ObjectBuilder.java