Class WSSecBase
java.lang.Object
org.apache.ws.security.message.WSSecBase
- Direct Known Subclasses:
WSSecDerivedKeyBase, WSSecEncryptedKey, WSSecSAMLToken, WSSecSignature, WSSecSignatureConfirmation, WSSecTimestamp, WSSecUsernameToken
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.
- Author:
- Werner Dittmann (Werner.Dittmann@apache.org)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the value of thekeyIdentifyerType.protected StringLooks up or adds a body id.voidsetKeyIdentifierType(int keyIdType) Sets which key identifier to use.voidSet which parts of the message to encrypt/sign.voidsetUserInfo(String user, String password) Set the user and password info.voidsetWsConfig(WSSConfig wsConfig) protected String
-
Field Details
-
user
-
password
-
keyIdentifierType
protected int keyIdentifierType -
parts
-
doDebug
protected boolean doDebug -
wssConfig
-
-
Constructor Details
-
WSSecBase
public WSSecBase()Constructor.
-
-
Method Details
-
setParts
Set which parts of the message to encrypt/sign.- Parameters:
parts- The vector containing the WSEncryptionPart objects
-
setKeyIdentifierType
-
getKeyIdentifierType
public int getKeyIdentifierType()Gets the value of thekeyIdentifyerType.- Returns:
- The
keyIdentifyerType. - See Also:
-
setWsConfig
- Parameters:
wsConfig- The wsConfig to set.
-
setBodyID
Looks up or adds a body id. First try to locate thewsu:Idin the SOAP body element. If one is found, the value of thewsu:Idattribute is returned. Otherwise the methode generates a newwsu:Idand an appropriate value.- Parameters:
doc- The SOAP envelope asDocument- Returns:
- The value of the
wsu:Idattribute of the SOAP body - Throws:
Exception
-
setWsuId
-
setUserInfo
Set the user and password info. Both information is used to get the user's private signing key.- Parameters:
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 keystore
-