@Override
    protected Envelope buildResponse(final Optional<Assertion> assertion,
                                     final SamlProfileBuilderContext context) throws Exception {
        LOGGER.debug("Locating the assertion consumer service url for binding [{}]", context.getBinding());
        val acs = context.getAdaptor().getAssertionConsumerService(context.getBinding());
        LOGGER.debug("Located assertion consumer service url [{}]", acs);
        val ecpResponse = newEcpResponse(acs.getLocation());
        val header = SamlUtils.newSoapObject(Header.class);
        header.getUnknownXMLObjects().add(ecpResponse);
        val body = SamlUtils.newSoapObject(Body.class);
        val saml2Response = buildSaml2Response(context);
        body.getUnknownXMLObjects().add(saml2Response);
        val envelope = SamlUtils.newSoapObject(Envelope.class);
        envelope.setHeader(header);
        envelope.setBody(body);
        openSamlConfigBean.logObject(envelope);
        return envelope;
    }
The {@link SamlProfileSamlSoap11ResponseBuilder} is responsible for
building the final SAML assertion for the relying party.

@author Misagh Moayyed
@since 4.2
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/response/soap/SamlProfileSamlSoap11ResponseBuilder.java