Package org.apache.ws.security.message
Class WSSecHeader
- java.lang.Object
-
- org.apache.ws.security.message.WSSecHeader
-
public class WSSecHeader extends java.lang.ObjectThis class implements WS Security header. Setup a Security header with a specified actor and mustunderstand flag. The defaults for actor and mustunderstand are: emptyactorandmustunderstandis true.- Author:
- Werner Dittmann (Werner.Dittmann@apache.org)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringactorprotected booleandoDebugprotected booleanmustunderstand
-
Constructor Summary
Constructors Constructor Description WSSecHeader()Constructor.WSSecHeader(java.lang.String actor)Constructor.WSSecHeader(java.lang.String act, boolean mu)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.ElementgetSecurityHeader()Get the security header element of this instance.org.w3c.dom.ElementinsertSecurityHeader(org.w3c.dom.Document doc)Creates a security header and inserts it as child into the SOAP Envelope.voidsetActor(java.lang.String act)set actor name.voidsetMustUnderstand(boolean mu)Set themustUnderstandflag for thewsse:Securityheader.
-
-
-
Constructor Detail
-
WSSecHeader
public WSSecHeader()
Constructor.
-
WSSecHeader
public WSSecHeader(java.lang.String actor)
Constructor.- Parameters:
actor- The actor name of thewsse:Securityheader
-
WSSecHeader
public WSSecHeader(java.lang.String act, boolean mu)Constructor.- Parameters:
actor- The actor name of thewsse:Securityheadermu- SetmustUnderstandto true or false
-
-
Method Detail
-
setActor
public void setActor(java.lang.String act)
set actor name.- Parameters:
act- The actor name of thewsse:Securityheader
-
setMustUnderstand
public void setMustUnderstand(boolean mu)
Set themustUnderstandflag for thewsse:Securityheader.- Parameters:
mu- SetmustUnderstandto true or false
-
getSecurityHeader
public org.w3c.dom.Element getSecurityHeader()
Get the security header element of this instance.- Returns:
- The security header element.
-
insertSecurityHeader
public org.w3c.dom.Element insertSecurityHeader(org.w3c.dom.Document doc)
Creates a security header and inserts it as child into the SOAP Envelope. Check if a WS Security header block for an actor is already available in the document. If a header block is found return it, otherwise a new wsse:Security header block is created and the attributes set- Parameters:
doc- A SOAP envelope asDocument- Returns:
- A
wsse:Securityelement
-
-