Class WSSecSignatureConfirmation


  • public class WSSecSignatureConfirmation
    extends WSSecBase
    Builds a WS SignatureConfirmation and inserts it into the SOAP Envelope.
    • Constructor Detail

      • WSSecSignatureConfirmation

        public WSSecSignatureConfirmation​(WSSecHeader securityHeader)
      • WSSecSignatureConfirmation

        public WSSecSignatureConfirmation​(Document doc)
    • Method Detail

      • setSignatureValue

        public void setSignatureValue​(byte[] signatureValue)
        Set the Signature value to store in this SignatureConfirmation.
        Parameters:
        signatureValue - The Signature value to store in the SignatureConfirmation element
      • prepare

        public void prepare()
        Creates a SignatureConfimation element. The method prepares and initializes a WSSec SignatureConfirmation structure after the relevant information was set. Before calling prepare() the filed signatureValue must be set
      • prependToHeader

        public void prependToHeader()
        Prepends the SignatureConfirmation element to the elements already in the Security header. The method can be called any time after prepare(). This allows to insert the SignatureConfirmation element at any position in the Security header.
      • build

        public Document build​(byte[] sigVal)
        Adds a new SignatureConfirmation to a soap envelope. A complete SignatureConfirmation is constructed and added to the wsse:Security header.
        Parameters:
        sigVal - the Signature value. This will be the content of the "Value" attribute.
        Returns:
        Document with SignatureConfirmation added
      • getId

        public String getId()
        Get the id generated during prepare(). Returns the the value of wsu:Id attribute of this SignatureConfirmation.
        Returns:
        Return the wsu:Id of this token or null if prepareToken() was not called before.
      • getSignatureConfirmationElement

        public Element getSignatureConfirmationElement()
        Get the SignatureConfirmation element generated during prepare().
        Returns:
        Return the SignatureConfirmation element or null if prepare() was not called before.