private List<WSSecurityEngineResult> verifyWithoutProfile(Document doc) throws Exception {
SamlAssertionValidator validator = new SamlAssertionValidator();
validator.setValidateSignatureAgainstProfile(false);
WSSecurityEngine secEngine = new WSSecurityEngine();
WSSConfig config = secEngine.getWssConfig();
config.setValidator(WSSecurityEngine.SAML_TOKEN, validator);
config.setValidator(WSSecurityEngine.SAML2_TOKEN, validator);
List<WSSecurityEngineResult> results =
secEngine.processSecurityHeader(
doc, null, null, crypto
);
String outputString =
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);