);
}
//
// prepare a SignatureConfirmation token
//
WSSecSignatureConfirmation wsc = new WSSecSignatureConfirmation(reqData.getWssConfig());
SignatureActionToken signatureToken = (SignatureActionToken)actionToken;
if (signatureToken == null) {
signatureToken = reqData.getSignatureToken();
}
List<WSEncryptionPart> signatureParts = signatureToken.getParts();
if (signatureActions.size() > 0) {
if (log.isDebugEnabled()) {
log.debug("Signature Confirmation: number of Signature results: "
+ signatureActions.size());
}
for (int i = 0; i < signatureActions.size(); i++) {
WSSecurityEngineResult wsr = signatureActions.get(i);
byte[] sigVal = (byte[]) wsr.get(WSSecurityEngineResult.TAG_SIGNATURE_VALUE);
wsc.build(doc, sigVal, reqData.getSecHeader());
signatureParts.add(new WSEncryptionPart(wsc.getId()));
}
} else {
wsc.build(doc, null, reqData.getSecHeader());
signatureParts.add(new WSEncryptionPart(wsc.getId()));
}
handler.setProperty(
reqData.getMsgContext(), WSHandlerConstants.SIG_CONF_DONE, ""
);
}