public interface WSSSignature
WSSFactory factory = WSSFactory.getInstance();
WSSGenerationContext gencont = factory.newWSSGenerationContext();
X509GenerateCallbackHandler callbackhandler = generateCallbackHandler();
SecurityToken token = factory.newSecurityToken(X509Token.class, callbackHandler);
WSSSignature sig = factory.newWSSSignature(token);
gencont.add(sig);
WSSSignPart| Modifier and Type | Field and Description |
|---|---|
static int |
ADDRESSING_HEADERS
The keyword for the WS-Addressing headers that are defined by the Web Services Addressing(WS-Addressing) specification.
|
static int |
BODY
The keyword for the SOAP body.
|
static java.lang.String |
C14N
The URI for the inclusive canonicalization algorithm, C14n:
http://www.w3.org/2001/10/xml-c14n#.
|
static java.lang.String |
EXC_C14N
The URI for the exclusive canonicalization algorithm, Exc-C14n:
http://www.w3.org/2001/10/xml-exc-c14n#.
|
static java.lang.String |
HMAC_SHA1
The URI for the signature algorithm, HMAC_SHA1:
http://www.w3.org/2000/09/xmldsig#hmac-sha1.
|
static java.lang.String |
RSA_SHA1
The URI for the signature algorithm, RSA_SHA1:
http://www.w3.org/2000/09/xmldsig#rsa-sha1.
|
static int |
TIMESTAMP
The keyword for the creation and expiration time stamp information.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSignHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a signature part.
|
void |
addSignPart(int keyword)
|
void |
addSignPart(SecurityToken securityToken)
Adds the SecurityToken object as a signature part.
|
void |
addSignPart(WSSSignPart part)
Adds the WSSSignaturePart object as a signature part.
|
void |
addSignPart(WSSTimestamp timestamp)
Adds the WSSTimestamp object as a signature part.
|
void |
addSignPartByXPath(java.lang.String xpath)
Adds an XPath expression as a signature part.
|
void |
requireSignatureConfirmation()
Stores the its value of the signature confirmation in order to validate the
signature confirmation after the receiving the message with it.
|
void |
setCanonicalizationMethod(java.lang.String algorithm)
Sets the canonicalization method.
|
void |
setSignatureMethod(java.lang.String algorithm)
Sets the signature method.
|
void |
setTokenReference(int refType)
|
static final int BODY
static final int ADDRESSING_HEADERS
static final int TIMESTAMP
static final java.lang.String RSA_SHA1
static final java.lang.String HMAC_SHA1
static final java.lang.String EXC_C14N
static final java.lang.String C14N
void addSignPart(int keyword)
throws WSSException
keyword - signature partWSSException - if the part is not valid.void addSignPart(WSSSignPart part)
part - signature partvoid addSignPart(SecurityToken securityToken)
securityToken - signature partvoid addSignPart(WSSTimestamp timestamp)
timestamp - signature part.void addSignPartByXPath(java.lang.String xpath)
xpath - XPath expression of a signature partvoid addSignHeader(javax.xml.namespace.QName header)
header - signature partvoid setSignatureMethod(java.lang.String algorithm)
throws WSSException
algorithm - signature algorithmWSSException - the algorithm is not supportedvoid setCanonicalizationMethod(java.lang.String algorithm)
throws WSSException
algorithm - canonicalization methodWSSException - the algorithm is not supportedvoid setTokenReference(int refType)
throws WSSException
refType - type of token referenceWSSException - if the reference type is not valid.void requireSignatureConfirmation()