Reputation: 1986
I tried to generate web service classes from following url https://example.com:20008/mws-ws/services/TL_M3_PRSystem_Integration?wsdl this web service is working under a specific VPN.
I used apache cxf to generate java classes for this web service.
Then I got following error on cmd,
I could generate classes when I used an unsecured soap web service.
Anyone have idea about this ?
Upvotes: 0
Views: 548
Reputation: 51451
It's most likely signed by a self-signed (untrusted) certificate. The easiest way is to add this certificate to the cacerts
java keystore or add it to a custom store and run wsimport
with javax.net.ssl.trustStore
property set to the custom store.
keystore
tool to import the certificate into cacerts
keystore.In the terminal:
$JAVA_HOME/bin/keytool -import -alias MyCustomCert -keystore $JAVA_HOME/jre/lib/security/cacerts -file ~/path/to/saved/cert
or on Windows:
%JAVA_HOME%\bin\keytool -import -alias MyCustomCert -keystore %JAVA_HOME%\jre\lib\security\cacerts -file C:\whereever\the\file\is
Make sure JAVA_HOME environment variable is defined and the command prompt you're using has permission to write to the %JAVA_HOME%\jre\lib\security\cacerts
file.
Upvotes: 2