Package org.apache.ws.security.message
Class WSSignEnvelope
java.lang.Object
org.apache.ws.security.message.WSBaseMessage
org.apache.ws.security.message.WSSignEnvelope
Signs a SOAP envelope according to WS Specification, X509 profile, and adds
the signature data.
- Author:
- Davanum Srinivas (dims@yahoo.com), Werner Dittmann (Werner.Dittman@siemens.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected byte[]
protected WSSAddUsernameToken
protected boolean
Fields inherited from class org.apache.ws.security.message.WSBaseMessage
actor, doDebug, keyIdentifierType, mustunderstand, parts, password, timeToLive, user, wssConfig
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.WSSignEnvelope
(String actor) Deprecated.replaced byWSSecSignature()
andWSSecHeader
for actor specification.WSSignEnvelope
(String actor, boolean mu) Deprecated.replaced byWSSecSignature()
andWSSecHeader
for actor and mustunderstand specification. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.protected Element
protected Set
getInclusivePrefixes
(Element target) protected Set
getInclusivePrefixes
(Element target, boolean excludeVisible) Deprecated.replaced byWSSecSignature.getSigCanonicalization()
Deprecated.replaced byWSSecSignature.getSignatureAlgorithm()
byte[]
Deprecated.replaced byWSSecSignature.getSignatureValue()
boolean
Deprecated.replaced byWSSecSignature.isUseSingleCertificate()
void
setSigCanonicalization
(String algo) Deprecated.replaced byWSSecSignature.setSigCanonicalization(String)
void
setSignatureAlgorithm
(String algo) Deprecated.replaced byWSSecSignature.setSignatureAlgorithm(String)
void
setUsernameToken
(WSSAddUsernameToken usernameToken) Deprecated.void
setUseSingleCertificate
(boolean useSingleCert) Deprecated.replaced byWSSecSignature.setUseSingleCertificate(boolean)
Methods inherited from class org.apache.ws.security.message.WSBaseMessage
getKeyIdentifierType, insertSecurityHeader, setActor, setBodyID, setKeyIdentifierType, setMustUnderstand, setParts, setTimeToLive, setUserInfo, setWsConfig, setWsuId
-
Field Details
-
useSingleCert
protected boolean useSingleCert -
sigAlgo
-
canonAlgo
-
usernameToken
-
signatureValue
protected byte[] signatureValue
-
-
Constructor Details
-
WSSignEnvelope
public WSSignEnvelope()Deprecated.replaced byWSSecSignature()
Constructor. -
WSSignEnvelope
Deprecated.replaced byWSSecSignature()
andWSSecHeader
for actor specification.Constructor.- Parameters:
actor
- The actor name of thewsse:Security
header
-
WSSignEnvelope
Deprecated.replaced byWSSecSignature()
andWSSecHeader
for actor and mustunderstand specification.Constructor.- Parameters:
actor
- The actor name of thewsse:Security
headermu
- SetmustUnderstand
to true or false
-
-
Method Details
-
setUseSingleCertificate
public void setUseSingleCertificate(boolean useSingleCert) Deprecated.replaced byWSSecSignature.setUseSingleCertificate(boolean)
set the single cert flag.- Parameters:
useSingleCert
-
-
isUseSingleCertificate
public boolean isUseSingleCertificate()Deprecated.replaced byWSSecSignature.isUseSingleCertificate()
Get the single cert flag.- Returns:
- If to use a single cert
-
setSignatureAlgorithm
Deprecated.replaced byWSSecSignature.setSignatureAlgorithm(String)
Set the name of the signature encryption algorithm to use. If the algorithm is not set then Triple RSA is used. Refer to WSConstants which algorithms are supported.- Parameters:
algo
- Is the name of the signature algorithm- See Also:
-
getSignatureAlgorithm
Deprecated.replaced byWSSecSignature.getSignatureAlgorithm()
Get the name of the signature algorithm that is being used. If the algorithm is not set then RSA is default.- Returns:
- the identifier URI of the signature algorithm
-
setSigCanonicalization
Deprecated.replaced byWSSecSignature.setSigCanonicalization(String)
Set the canonicalization method to use. If the canonicalization method is not set then the recommended Exclusive XML Canonicalization is used by default Refer to WSConstants which algorithms are supported.- Parameters:
algo
- Is the name of the signature algorithm- See Also:
-
getSigCanonicalization
Deprecated.replaced byWSSecSignature.getSigCanonicalization()
Get the canonicalization method. If the canonicalization method was not set then Exclusive XML Canonicalization is used by default.- Returns:
- TODO
-
setUsernameToken
Deprecated.- Parameters:
usernameToken
- The usernameToken to set.
-
getSignatureValue
public byte[] getSignatureValue()Deprecated.replaced byWSSecSignature.getSignatureValue()
- Returns:
- Returns the signatureValue.
-
build
Deprecated.Builds a signed soap envelope. The method first gets an appropriate security header. According to the defined parameters for certificate handling the signature elements are constructed and inserted into thewsse:Signature
- Parameters:
doc
- The unsigned SOAP envelope asDocument
crypto
- An instance of the Crypto API to handle keystore and certificates- Returns:
- A signed SOAP envelope as
Document
- Throws:
WSSecurityException
-
createSTRParameter
-
getInclusivePrefixes
-
getInclusivePrefixes
-
WSSecSignature()