protected void invokeOutboundMessageHandlers(final SPSSODescriptor spDescriptor,
                                                       final IDPSSODescriptor idpssoDescriptor,
                                                       final MessageContext messageContext) {
        try {
            MessageHandler handlerEnd =
                new EndpointURLSchemeSecurityHandler();
            handlerEnd.initialize();
            handlerEnd.invoke(messageContext);

            MessageHandler handlerDest =
                new SAMLOutboundDestinationHandler();
            handlerDest.initialize();
            handlerDest.invoke(messageContext);

            if (!destinationBindingType.equals(SAMLConstants.SAML2_REDIRECT_BINDING_URI) &&
                    mustSignRequest(spDescriptor, idpssoDescriptor)) {
                LOGGER.debug("Signing SAML2 outbound context...");
                val handler = new
                    SAMLOutboundProtocolMessageSigningHandler();
                handler.setSignErrorResponses(this.signErrorResponses);
                handler.initialize();
                handler.invoke(messageContext);
            }
        } catch (final Exception e) {
            throw new SAMLException(e);
        }
    }
<p>invokeOutboundMessageHandlers.</p>

@param spDescriptor a {@link SPSSODescriptor} object
@param idpssoDescriptor a {@link IDPSSODescriptor} object
@param messageContext a {@link MessageContext} object
pac4j-saml/src/main/java/org/pac4j/saml/profile/impl/AbstractSAML2MessageSender.java