Hello, I'm trying to get WS-Security working with CXF (2.7.4) but I'm stuck with a problem: when the client tries to send a message to the server the encryption of the message fails with a NullPointerException. The stacktrace is the following:
Caused by: java.lang.NullPointerException: null at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.setEncryptionUser(AbstractBindingBuilder.java:1622) ~[cxf-rt-ws-security-2.7.4.jar:2.7.4] at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doEncryption(AsymmetricBindingHandler.java:411) ~[cxf-rt-ws-security-2.7.4.jar:2.7.4] at org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler.doSignBeforeEncrypt(AsymmetricBindingHandler.java:190) ~[cxf-rt-ws-security-2.7.4.jar:2.7.4] The code line indicated to throw the exception in the stacktrace is the following: List<WSHandlerResult> results = CastUtils.cast((List<?>) message.getExchange().getInMessage().get(WSHandlerConstants.RECV_RESULTS)); The debug showed that the .getInMessage() returns null which is ok I think as there wasn't any inbound message before. This is a bug in the wss4j implementation or I misconfigured something? Thanks for you help! Best regards, Márton Horváth
