Project that works in SoapUi 4.6.1 fails in SoapUi
I have a SoapUi project from 4.6.1 that uses WS-Security to connect to a Apache CXF 2.3.1/JBoss6 SOAP web service.
The SSL global preferences are set with a certificate that gets through our proxy, then the WS-Security configuration references a keystore containing the same SSL certificate and a truststore with the public key of the server.
The requests must be timestamped and signed. The responses are timestamped, signed (the timestamp Content and the Body element), and encrypted (Body content).
In SoapUi 5.2, when I load this project and submit a request, I get back an 200 response and then an error message that says "Error getting response for ... ;null"
In the http log I see the headers of the response and then what looks like the entire response encrypted. I see no errors in the "error log".
For grins, I went into the WS-Security "incoming" configuration and flipped the values for the decrypt and signature keystores around, my client.jks and client-truststore.jks, respectively.
When I did that, I no longer got a "null" response, I see the Soap envelope, but the soap:Body contains a <xenc: EncryptedData" element. I also get a WSSecurityException in the error log saying that "The signature or decyrption was invalid". The root cause is:
Caused by: org.apache.ws.security.WSSecurityException: The keystore is null
at org.apache.ws.security.components.crypto.Merlin.getPrivateKey(Merlin.java:639)
at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:141)
So, obviously, something has changed in the way I should be configuring SoapUi. The last go around with SoapUi 4.6.1, it seemed to take forever before I settled on a WS-Security configuration that worked.
Any suggestions?
Thanks.
Hi,
I have seen similar issues those you are describing, perhaps since version 5.0. The signature and timestamp functionity seems to work ok, but the encrytion causes that null response - I think its to do with the WSS4j related libraries that SoapUI bundles, and is in fact a confusing, but hopefully quite easily fixed bug. This post relates to the same problem and provides details of a solution by way of copying in the newer / required library version:
Hope this helps,
Cheers,
Rupert