I can generate a client from
http://localhost:8080/service?wsdl
just fine, but now I want to generate a client from
https://localhost:8081/service?wsdl
and Eclipse says the location is invalid, and when Eclipse makes the attempt my Jetty server says
javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
I can easily navigate to the wsdl in my browser after confirming the security exception, so it's definitely there.
I've tried downloading the wsdl to my local file system, but I still can't generate it from there because the wsdl contains a reference to other https locations, eg.
<xsd:import namespace="http://my.service.namespace/" schemaLocation="https://localhost:8081/serviceSchema?xsd=1"/>
I've modified eclipse.ini to contain the following lines:
-Djavax.net.ssl.trustStore="/path/to/my/truststore/.keystore"
-Djavax.net.ssl.trustStorePassword="mytruststorepassword"
-Djavax.net.ssl.keyStore="/path/to/my/keystore/.keystore"
-Djavax.net.ssl.keyStorePassword="mykeystorepassword"
to no avail. Eclipse does not appear to have any preference settings related to this either. Is there any way to do this through eclipse, or will I have to use some external tool?
EDIT: For others with the same issue, here's how I solved it.
Open the dependency you just downloaded with a browser and copy its new location, eg.
file:///path/to/my/schema/service.xsd
Save the wsdl to your local file system and generate from there, it seems it is a bug at Eclipse, and pls check this link too.