Looks like you are using crimson parser, I think it is recommended to use Xerces parser with wss4j
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 11:39 AM To: [email protected] Subject: NPE from wss4j1.1 while doing 2 way encryption Hi I was trying to do 2 way encryption and got a NullPointerException from the org.apache.ws.security.util.WSSecurityUtil. I am not sure if this is a bug in the WSS4J or my wrong. I have exchanged the certificates between the server and the client store and was monitoring using the TCPMon. The message flows fine from the client to the server and the server decrypts correctly. Then the server encrypts the response using the clients certificate and the response is seen properly in the TCPMon. After that when it reaches the client side I get this error. This seems strange as its giving a NPE while finding the element for that DataRef id. I saw the message and the DataRef looks prefectly mapped to the encrypted portion in the soap body. I am not using any encryption parts. Any ideas if this is a known bug or not? AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NullPointerException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException at org.apache.crimson.tree.ElementNode2.getAttributeNodeNS(ElementNode2.java:432) at org.apache.crimson.tree.ElementNode2.hasAttributeNS(ElementNode2.java:388) at org.apache.ws.security.util.WSSecurityUtil.findElementById(WSSecurityUtil.java:364) at org.apache.ws.security.util.WSSecurityUtil.getElementByWsuId(WSSecurityUtil.java:548) at org.apache.ws.security.WSSecurityEngine.decryptDataRef(WSSecurityEngine.java:1197) at org.apache.ws.security.WSSecurityEngine.handleEncryptedKey(WSSecurityEngine.java:1174) at org.apache.ws.security.WSSecurityEngine.handleEncryptedKey(WSSecurityEngine.java:929) at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:349) at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245) at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:156) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) thanks Anamitra --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
