WSSecurityUtil.fetchAllActionResults(wshResult.getResults(),
WSConstants.UT_SIGN, signatureActions);
}
Vector signatureParts = reqData.getSignatureParts();
// prepare a SignatureConfirmation token
WSSecSignatureConfirmation wsc = new WSSecSignatureConfirmation();
int idHash = wsc.hashCode();
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 = (WSSecurityEngineResult) signatureActions
.get(i);
byte[] sigVal = wsr.getSignatureValue();
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,
WSHandler.DONE);
}