Element timestampElement =
doc.createElementNS(
WSConstants.WSU_NS, WSConstants.WSU_PREFIX + ":" + WSConstants.TIMESTAMP_TOKEN_LN
);
DateFormat zulu = new XmlSchemaDateFormat();
Element elementCreated =
doc.createElementNS(
WSConstants.WSU_NS, WSConstants.WSU_PREFIX + ":" + WSConstants.CREATED_LN
);
Date createdDate = new Date();
long currentTime = createdDate.getTime() + 300000;
createdDate.setTime(currentTime);
elementCreated.appendChild(doc.createTextNode(zulu.format(createdDate)));
timestampElement.appendChild(elementCreated);
Date expiresDate = new Date();
expiresDate.setTime(expiresDate.getTime() -300000);
Element elementExpires =
doc.createElementNS(
WSConstants.WSU_NS, WSConstants.WSU_PREFIX + ":" + WSConstants.EXPIRES_LN
);
elementExpires.appendChild(doc.createTextNode(zulu.format(expiresDate)));
timestampElement.appendChild(elementExpires);
secHeader.getSecurityHeader().appendChild(timestampElement);
if (LOG.isDebugEnabled()) {