Class WSSecHeader
java.lang.Object
org.apache.ws.security.message.WSSecHeader
This class implements WS Security header.
Setup a Security header with a specified actor and mustunderstand flag.
The defaults for actor and mustunderstand are: empty
actor and
mustunderstand is true.- Author:
- Werner Dittmann (Werner.Dittmann@apache.org)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.WSSecHeader(String actor) Constructor.WSSecHeader(String act, boolean mu) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the security header element of this instance.Creates a security header and inserts it as child into the SOAP Envelope.voidset actor name.voidsetMustUnderstand(boolean mu) Set themustUnderstandflag for thewsse:Securityheader.
-
Field Details
-
actor
-
mustunderstand
protected boolean mustunderstand -
doDebug
protected boolean doDebug
-
-
Constructor Details
-
WSSecHeader
public WSSecHeader()Constructor. -
WSSecHeader
Constructor.- Parameters:
actor- The actor name of thewsse:Securityheader
-
WSSecHeader
Constructor.- Parameters:
mu- SetmustUnderstandto true or falseactor- The actor name of thewsse:Securityheader
-
-
Method Details
-
setActor
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
Get the security header element of this instance.- Returns:
- The security header element.
-
insertSecurityHeader
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
-