Package org.apache.ws.security.message
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.void
set actor name.void
setMustUnderstand
(boolean mu) Set themustUnderstand
flag for thewsse:Security
header.
-
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:Security
header
-
WSSecHeader
Constructor.- Parameters:
mu
- SetmustUnderstand
to true or falseactor
- The actor name of thewsse:Security
header
-
-
Method Details
-
setActor
set actor name.- Parameters:
act
- The actor name of thewsse:Security
header
-
setMustUnderstand
public void setMustUnderstand(boolean mu) Set themustUnderstand
flag for thewsse:Security
header.- Parameters:
mu
- SetmustUnderstand
to 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:Security
element
-