/** * Get the Validator instance corresponding to the QName * @param qName the QName with which to find a Validator instance * @return the Validator instance corresponding to the QName * @throws WSSecurityException */ public Validator getValidator(QName qName) throws WSSecurityException { // Check the custom Validator Map first if (getMsgContext() instanceof Map<?,?>) { @SuppressWarnings("unchecked") Map<QName, Validator> validatorMap = (Map<QName, Validator>)((Map<?,?>)getMsgContext()).get(ConfigurationConstants.VALIDATOR_MAP); if (validatorMap != null && validatorMap.containsKey(qName)) { return validatorMap.get(qName); } } if (wssConfig != null) { return wssConfig.getValidator(qName); } return null; }