LifetimeType lifeTime = new LifetimeType();
// Get the Created
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
String subTag = StaxParserUtil.getStartElementName(subEvent);
if (subTag.equals(WSTrustConstants.CREATED)) {
AttributedDateTime created = new AttributedDateTime();
created.setValue(StaxParserUtil.getElementText(xmlEventReader));
lifeTime.setCreated(created);
}
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
subTag = StaxParserUtil.getStartElementName(subEvent);
if (subTag.equals(WSTrustConstants.EXPIRES)) {
AttributedDateTime expires = new AttributedDateTime();
expires.setValue(StaxParserUtil.getElementText(xmlEventReader));
lifeTime.setExpires(expires);
} else
throw logger.parserUnknownTag(subTag, subEvent.getLocation());
responseToken.setLifetime(new Lifetime(lifeTime));