My code to invoke EJBCA service is as below
CryptoProviderTools.installBCProvider();
String keyStorePath ="C:/softwares/ejbca/ejbca_ce_6_2_0/p12/superadmin.p12";
String password = "ejbca";
final String urlstr = "https://localhost:8443/ejbca/ejbcaws/ejbcaws?wsdl";
System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore", keyStorePath);
System.setProperty("javax.net.ssl.keyStorePassword", password);
System.setProperty("javax.net.ssl.trustStore", "C:/softwares/ejbca/ejbca_ce_6_2_0/p12/truststore.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
final Provider tlsProvider = new TLSProvider();
Security.addProvider(tlsProvider);
Security.setProperty("ssl.TrustManagerFactory.algorithm", "AcceptAll");
Security.setProperty("ssl.KeyManagerFactory.algorithm", "NewSunX509");
final QName qname = new QName("http://ws.protocol.core.ejbca.org/", "EjbcaWSService");
final EjbcaWSService service = new EjbcaWSService(new URL(urlstr), qname);
ejbcaraws = service.getEjbcaWSPort();
This program works smoothly in standalone but fails with below error in web application:
javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://localhost:8443/ejbca/ejbcaws/ejbcaws?wsdl. It failed with: Got Software caused connection abort: recv failed while opening stream from https://localhost:8443/ejbca/ejbcaws/ejbcaws?wsdl.
I tried searching other topics but I did not get concrete solution. Could you please advice how to rectify this issue?