while (enumeration.hasMoreElements()) {
String s = (String) enumeration.nextElement();
messageContext.put(s, properties.get(s));
}
RequestData requestData = new RequestData();
requestData.setMsgContext(messageContext);
if (client) {
final Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
requestData.setDecCrypto(crypto);
requestData.setSigVerCrypto(crypto);
} else {
final Crypto crypto = CryptoFactory.getInstance("receiver-crypto.properties");
requestData.setDecCrypto(crypto);
requestData.setSigVerCrypto(crypto);
}
if (properties.get(WSHandlerConstants.ALLOW_USERNAMETOKEN_NOPASSWORD) != null) {
messageContext.put(WSHandlerConstants.ALLOW_USERNAMETOKEN_NOPASSWORD,
properties.get(WSHandlerConstants.ALLOW_USERNAMETOKEN_NOPASSWORD));
} else if (WSHandlerConstants.USERNAME_TOKEN_SIGNATURE.equals(action)) {
messageContext.put(WSHandlerConstants.ALLOW_USERNAMETOKEN_NOPASSWORD, "true");
}
// Disable PrefixList checking as the stax code doesn't support this yet
//todo
List<BSPRule> ignoredRules = new ArrayList<BSPRule>();
ignoredRules.add(BSPRule.R5404);
ignoredRules.add(BSPRule.R5406);
ignoredRules.add(BSPRule.R5407);
ignoredRules.add(BSPRule.R5417);
ignoredRules.add(BSPRule.R3063);
ignoredRules.add(BSPRule.R5620);
ignoredRules.add(BSPRule.R5621);
//ignoredRules.add(BSPRule.R5215);
requestData.setIgnoredBSPRules(ignoredRules);
wss4JHandler.doReceiver(messageContext, requestData, false);
return messageContext;
}