/** * Prepends the SAML Assertion to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SAML assertion at any position in the * Security header. * * @param secHeader * The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { try { Element element = getElement(); if (element != null) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), element); } } catch (WSSecurityException ex) { throw new RuntimeException(ex.toString(), ex); } }
/** * Prepends the SAML Assertion to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SAML assertion at any position in the * Security header. * * @param secHeader * The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { try { Element element = getElement(); if (element != null) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), element); } } catch (WSSecurityException ex) { throw new RuntimeException(ex.toString(), ex); } }