-
Spring ws and SSL
Hi all, this is probably often question but I am stuck on this for 1 week and I still cannot find the solution.
TLDR: How to create simple Spring WS client with SSL?
But lets start from the beginning:
I am new to Spring and ws, after few different tutorials I read I created simple web service that works on my localhost. After few hours I found a good tutorial for client so I created it
http://justcompiled.blogspot.sk/2010...spring-ws.html
Everything works well. Now I would like to consume different ws with this client. This ws is remote and uses SSL. How can I do it? What should I change in my code? I added the certificate to cacerts in JDK using keytool, is that enough? Because there is still error
Code:
I/O error: java.security.cert.CertificateException: No name matching <ws provider>
I also set
Code:
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier
but then there is error 500: Internal error
Soap UI works well with this ws so I supose it works well.
Should I change something in my code, in Spring, set something in ApplicationContext? Or do you know some good tutorial for this?