secHeader.insertSecurityHeader(doc);
WSSecTimestamp timestamp = new WSSecTimestamp();
timestamp.setTimeToLive(300);
WSSConfig config = WSSConfig.getNewInstance();
WSTimeSource spoofedTimeSource = new WSTimeSource() {
public Date now() {
Date currentTime = new Date();
currentTime.setTime(currentTime.getTime() - (500L * 1000L));
return currentTime;
}
};
config.setCurrentTime(spoofedTimeSource);
timestamp.setWsConfig(config);
Document createdDoc = timestamp.build(doc, secHeader);
if (LOG.isDebugEnabled()) {