|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.message.WSBaseMessage
This is the base class for WS Security messages. It provides common functions and fields used by the specific message classes such as sign, encrypt, and username token.
Field Summary | |
protected java.lang.String |
actor
|
protected boolean |
doDebug
|
protected int |
keyIdentifierType
|
protected boolean |
mustunderstand
|
protected java.util.Vector |
parts
|
protected java.lang.String |
password
|
protected int |
timeToLive
|
protected java.lang.String |
user
|
protected WSSConfig |
wssConfig
|
Constructor Summary | |
WSBaseMessage()
Constructor. |
|
WSBaseMessage(java.lang.String actor)
Constructor. |
|
WSBaseMessage(java.lang.String actor,
boolean mu)
Constructor. |
|
WSBaseMessage(WSSConfig wssConfig,
java.lang.String actor,
boolean mu)
Constructor. |
Method Summary | |
int |
getKeyIdentifierType()
Gets the value of the keyIdentifyerType . |
protected org.w3c.dom.Element |
insertSecurityHeader(org.w3c.dom.Document doc)
Creates a security header and inserts it as child into the SOAP Envelope. |
void |
setActor(java.lang.String act)
set actor name. |
protected java.lang.String |
setBodyID(org.w3c.dom.Document doc)
Looks up or adds a body id. |
void |
setKeyIdentifierType(int keyIdType)
Sets which key identifier to use. |
void |
setMustUnderstand(boolean mu)
Set the mustUnderstand flag for the
wsse:Security header |
void |
setParts(java.util.Vector parts)
Set which parts of the message to encrypt/sign. |
void |
setTimeToLive(int ttl)
Set the time to live. |
void |
setUserInfo(java.lang.String user,
java.lang.String password)
Set the user and password info. |
protected java.lang.String |
setWsuId(org.w3c.dom.Element bodyElement)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String actor
protected boolean mustunderstand
protected java.lang.String user
protected java.lang.String password
protected int keyIdentifierType
protected java.util.Vector parts
protected int timeToLive
protected WSSConfig wssConfig
protected boolean doDebug
Constructor Detail |
public WSBaseMessage()
public WSBaseMessage(java.lang.String actor)
actor
- The actor name of the wsse:Security
headerpublic WSBaseMessage(java.lang.String actor, boolean mu)
actor
- The actor name of the wsse:Security
headermu
- Set mustUnderstand
to true or falsepublic WSBaseMessage(WSSConfig wssConfig, java.lang.String actor, boolean mu)
wssConfig
- configuration options for processing and building security headersactor
- The actor name of the wsse:Security
headermu
- Set mustUnderstand
to true or falseMethod Detail |
public void setActor(java.lang.String act)
act
- The actor name of the wsse:Security
headerpublic void setTimeToLive(int ttl)
Created
and the Expires
in Timestamp
.
ttl
- The time to live in secondpublic void setParts(java.util.Vector parts)
public void setMustUnderstand(boolean mu)
mustUnderstand
flag for the
wsse:Security
header
mu
- Set mustUnderstand
to true or falsepublic void setKeyIdentifierType(int keyIdType)
signature
or the
ecnryption
function to set up the key identification elements.
keyIdType
- WSConstants.ISSUER_SERIAL
,
WSConstants.BST_DIRECT_REFERENCE
,
WSConstants.X509_KEY_IDENTIFIER
,
WSConstants.SKI_KEY_IDENTIFIER
public int getKeyIdentifierType()
keyIdentifyerType
.
keyIdentifyerType
.WSConstants.ISSUER_SERIAL
,
WSConstants.BST_DIRECT_REFERENCE
,
WSConstants.X509_KEY_IDENTIFIER
,
WSConstants.SKI_KEY_IDENTIFIER
protected java.lang.String setBodyID(org.w3c.dom.Document doc) throws java.lang.Exception
wsu:Id
in the SOAP body element.
If one is found, the value of the wsu:Id
attribute is returned.
Otherwise the methode generates a new wsu:Id
and an
appropriate value.
doc
- The SOAP envelope as Document
wsu:Id
attribute
of the SOAP body
java.lang.Exception
protected java.lang.String setWsuId(org.w3c.dom.Element bodyElement)
public void setUserInfo(java.lang.String user, java.lang.String password)
user
- This is the user's alias name in the keystore that
identifies the private key to sign the documentpassword
- The user's password to get the private signing key
from the keystoreprotected org.w3c.dom.Element insertSecurityHeader(org.w3c.dom.Document doc)
doc
- A SOAP envelope as Document
wsse:Security
element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |