Am new to SOAP and am trying to run wsimport command to generate the stubs so that i can call the related services. I have the wsdl url and to access this I would need to authenticate. So i tried below command to resolve authentication issue:
wsimport -Xauthfile C:\auth.txt -keep http://example.com/test?wsdl -s c:\path\to\source\
However when i launch the server url in browser, it complains about the "site is not secure" and I started facing certificateexception after authentication was resolved.
List of things i tried:
- Did Google and got to know that adding the certificate to cacerts keystore in
"C:\Program Files\Java\jdk1.8.0_161\jre\lib\security\cacerts "
would solve certificate issue.
- Used keytool command to add the certificate to keystore. below is the command and it is failing with illegal option.
keytool -import -trustcacerts -alias aliasname -file cert.cer -keystore C:\Program Files\Java\jdk1.8.0_161\jre\lib\security\cacerts
Illegal option: Files\Java\jdk1.8.0_161\jre\lib\security\cacerts"
Any help appreciated in resolving this issue?