java.lang.NoSuchMethodError: org.apache.xml.security.encryption.XMLCipher.setSecureValidation(Z)V
Hi,
I'm getting this lovely little error running a MockService that attempts to decrypt incoming data. The full cause stack trace is below. I'm using SoapUI 5.0.0. I'm pretty certain it's a soapui issue - I can recreate it with both the client and server in SoapUI - but I could do with a sanity check.
A quick overview of the setup:
- I have 2 keystores, one with a private key and one with the corresponding public key.
- Create a "server" project; import a wsdl and create a mock service.
- Create an incoming WS-Security config on the project using the private key.
- Change the mock service properties to use this as the Incoming WSS
- Create a second project using the same wsdl
- Create an outbound WS-Security config on the project using the public key to encrypt all or part of the message
- Create a request; set up authorization and set it to use this as the Outgoing WSS.
So, this is about the simplest WS-Security setup I can think of... Surely someone else must have seen this?
Thanks,
Nick
Caused by: java.lang.NoSuchMethodError: org.apache.xml.security.encryption.XMLCipher.setSecureValidation(Z)V
at org.apache.ws.security.processor.ReferenceListProcessor.decryptEncryptedData(ReferenceListProcessor.java:315)
at org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:451)
at org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRefs(EncryptedKeyProcessor.java:380)
at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:178)
at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:65)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:396)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:303)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:248)
at com.eviware.soapui.impl.wsdl.support.wss.IncomingWss.processIncoming(IncomingWss.java:125)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.initPostRequest(WsdlMockRequest.java:106)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.<init>(WsdlMockRequest.java:76)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:117)
What I think is happening - XMLCipher is part of apache santuario (AKA xmlsec) and ReferenceListProcessor is part of apache wss4j - looking at the pom files, SoapUI appears to be using wss4j 1.6.14 and xmlsec 1.4.5 but that version of wss4j requires xmlsec 1.5.6.