I have searched in vain for a straightforward example of calling a web service requiring SSL authentication and that has a self-signed certificate. I already have the code to be able to trust all certs, so you don't need to provide that. Just a simple example of being able to provide to the service the authentication parameters - username, password, and any other authentication-related parameters, transports, and headers necessary to authenticate successfully and make use of the service. Right now I am using Axis 1.4. Your responses will be greatly appreciated. Thanks.
Asked
Active
Viewed 4,104 times
1 Answers
2
Have you tried this? https://stackoverflow.com/a/3256676/372643
You'll need to initialise your socket factory from an SSLContext
that trusts this particular self-signed certificate.
Alternatively, you could import this specific certificate in your trust store (cacerts
in your JRE directory), or import it into a copy of this file and use it as a global trust store by pointing the javax.net.ssl.trustStore
system property to it (the default password is changeit
).