newEngine.getWssConfig().setPasswordsAreEncoded(true);
newEngine.getWssConfig().setAllowUsernameTokenNoPassword(true);
List<WSSecurityEngineResult> results = newEngine.processSecurityHeader(
signedDoc, null, new EncodedPasswordCallbackHandler(), null
);
WSSecurityEngineResult actionResult =
WSSecurityUtil.fetchActionResult(results, WSConstants.SIGN);
java.security.Principal principal =
(java.security.Principal) actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
// System.out.println(principal.getName());
assertTrue(principal.getName().indexOf("DK") != -1);
}