Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
WSSecHeader secHeader = new WSSecHeader();
secHeader.insertSecurityHeader(doc);
WSSConfig config = WSSConfig.getNewInstance();
WSTimeSource spoofedTimeSource = new WSTimeSource() {
public Date now() {
Date currentTime = new Date();
currentTime.setTime(currentTime.getTime() - (500L * 1000L));
return currentTime;