Hi Team, <<Resending incase if original mail not delivered>> While using org.apache.wss4j.common.token.SecurityTokenReference (Currently using wss4j 2.3.2 and xmlsec 2.2.3) constructor in one of our tests we are getting below exception. There is no functional impact due to this error but it refers to some string missing in properties file which we think is incorrect and it suppress actual cause of the issue. Wanted to know if anything else needs to be done before calling the below code (like WSS4J initialization or something else)? org.apache.wss4j.common.ext.WSSecurityException: No message with ID "badElement" found in resource bundle "org/apache/xml/security/resource/xmlsecurity" Code snippet org.apache.xml.security.Init.init(); String xmlContent = "<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" \r\n" + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\r\n" + " <wsse:UsernameToken wsu:Id=\"usernametoken\">\r\n" + " <wsse:Username>user1025</wsse:Username>\r\n" + " <wsse:Password>user1025</wsse:Password>\r\n" + " </wsse:UsernameToken>\r\n" + " </wsse:Security>"; DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setNamespaceAware(true); Document doc = documentBuilderFactory.newDocumentBuilder().parse(new InputSource(new StringReader(xmlContent))); SecurityTokenReference secTokRef = new SecurityTokenReference(doc.getDocumentElement(), new BSPEnforcer(false)); Regards, Sreenivas |
- Regarding No message with ID "badElement" f... Sreenivas Somavarapu
- Re: Regarding No message with ID "badElemen... Colm O hEigeartaigh