I developed a spring SOAP web service secured with x509 like it's described in the x-509-spring-rest-web-service-tutorial (I adapted it for the SOAP WS). It works fine. I can communicate with the service through the browser (to get WSDL or to check health) or SOAP UI (to make requests). SOAP UI configuration for it was tricky.
Then I've implemented a spring client to communicate with the server according to the spring-soap-client-tutorial. It works.
Now Im trying to facilitate a secure communication with x509. Im stuck on the build. To build I use this command
clean compile \
-Djavax.net.ssl.trustStore=src/main/resources/truststore.jks \
-Djavax.net.ssl.trustStoreType=JKS \
-Djavax.net.ssl.trustStorePassword=password
I get the exception
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
I suppose my truststore isn't correct. I put there ca with the signed server certificate. What should it contain? What else may I do wrong?