I need to create a Java client that consumes a soap webservice using https.
I can get authorization to work and I can download the wsdl file by issuing this command from a command line:
wget --certificate=undisclosed.crt.pem https://service.an-organization.com/foo/bar?wsdl
(Not really, the example has been obfuscated a bit)
My problem is that I have a hard time to find a Java example I can use to get the same thing working from a Java client. I'm currently not certain how the certificate should be handled. I am sure that I don't want to fiddle with the keystore and instead supply the certificate programatically.
The ultimate goal is to use some generated stubs that extends javax.xml.ws.Service. Such an example would be wonderful. But I would be more than happy with a vanilla Java client that was able just to download the wsdl file like I'm able to do using wget.
Please include any imports as well as any Maven coordinates if you use a library.