org.apache.ws.security.message
Class WSSecSignatureConfirmation

java.lang.Object
  extended byorg.apache.ws.security.message.WSSecBase
      extended byorg.apache.ws.security.message.WSSecSignatureConfirmation

public class WSSecSignatureConfirmation
extends WSSecBase

Builds a WS SignatureConfirmation and inserts it into the SOAP Envelope.

Author:
Werner Dittmann (Werner.Dittmann@t-online.de).

Field Summary
 
Fields inherited from class org.apache.ws.security.message.WSSecBase
doDebug, keyIdentifierType, parts, password, user, wssConfig
 
Constructor Summary
WSSecSignatureConfirmation()
          Constructor.
 
Method Summary
 org.w3c.dom.Document build(org.w3c.dom.Document doc, byte[] sigVal, WSSecHeader secHeader)
          Adds a new SignatureConfirmation to a soap envelope.
 java.lang.String getId()
          Get the id generated during prepare().
 org.w3c.dom.Element getSignatureConfirmationElement()
          Get the SignatureConfirmation element generated during prepare().
 void prepare(org.w3c.dom.Document doc)
          Creates a SignatureConfimation element.
 void prependToHeader(WSSecHeader secHeader)
          Prepends the SignatureConfirmation element to the elements already in the Security header.
 void setSignatureValue(byte[] signatureValue)
          Set the Signature value to store in this SignatureConfirmation.
 
Methods inherited from class org.apache.ws.security.message.WSSecBase
getKeyIdentifierType, setBodyID, setKeyIdentifierType, setParts, setUserInfo, setWsConfig, setWsuId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSSecSignatureConfirmation

public WSSecSignatureConfirmation()
Constructor.

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(org.w3c.dom.Document doc)
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

Parameters:
doc - The SOAP envelope as W3C document

prependToHeader

public void prependToHeader(WSSecHeader secHeader)
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.

Parameters:
secHeader - The security header that holds the Signature element.

build

public org.w3c.dom.Document build(org.w3c.dom.Document doc,
                                  byte[] sigVal,
                                  WSSecHeader secHeader)
Adds a new SignatureConfirmation to a soap envelope. A complete SignatureConfirmation is constructed and added to the wsse:Security header.

Parameters:
doc - The SOAP envelope as W3C document
sigVal - the Signature value. This will be the content of the "Value" attribute.
secHeader - The security header that holds the Signature element.
Returns:
Document with SignatureConfirmation added

getId

public java.lang.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 org.w3c.dom.Element getSignatureConfirmationElement()
Get the SignatureConfirmation element generated during prepare().

Returns:
Return the SignatureConfirmation element or null if prepare() was not called before.


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.