XMLUtils.PrettyDocumentToString(doc);
LOG.debug(outputString);
}
// This should work
WSSecurityEngine secEngine = new WSSecurityEngine();
secEngine.processSecurityHeader(doc, null, callbackHandler, null);
// This should not
try {
WSSConfig config = WSSConfig.getNewInstance();
config.setUtFutureTTL(0);
secEngine.setWssConfig(config);
secEngine.processSecurityHeader(doc, null, callbackHandler, null);
fail("The UsernameToken validation should have failed");
} catch (WSSecurityException ex) {
assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.MESSAGE_EXPIRED);
}
}