@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(policyConfiguration, "policyConfiguration is required");
Assert.isTrue(policyConfiguration.exists(), "policyConfiguration [" + policyConfiguration + "] does not exist");
Assert.notNull(callbackHandler, "callbackHandler is required");
XWSSProcessorFactory processorFactory = XWSSProcessorFactory.newInstance();
InputStream is = null;
try {
if (logger.isInfoEnabled()) {
logger.info("Loading policy configuration from from '" + policyConfiguration + "'");
}
is = policyConfiguration.getInputStream();
processor = processorFactory.createProcessorForSecurityConfiguration(is, callbackHandler);
}
finally {
if (is != null) {
is.close();
}