timestampElem);
final boolean stampOk =
verifyTimestamp(timestamp,
replayFilter.getMessageWindow());
if (!stampOk) {
throw new WSSecurityException(WSSecurityException.FAILURE,
"timestampNotOk");
}
} else {
checkMessageValidity(replayFilter, timestampElem,
messageIDHeader);
}
} else {
final String propertyValue =
SecurityPropertiesHelper.getReplayAttackFilter(servicePath,
resource);
if (rejectMsgSansTimestampHeader(msgCtx, propertyValue)) {
logger.debug("Required time stamp header was not added.");
throw new WSSecurityException(WSSecurityException.FAILURE,
"timestampRequired");
}
}
}