Galera,
Estou usando AXIS e não consigo resolver o seguinte erro:
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
O código segue abaixo:
String local = "https://www.esnfs.com.br:9443/enfsws/services/Enfs?wsdl";
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore","./jssecacerts");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("javax.net.ssl.keyStore","./piramideto2.pfx");
System.setProperty("javax.net.ssl.keyStorePassword", "123456");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", "./certifica.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "123456");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", "./AC_Certisign_Multipla_G3.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "123456");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", "./AC_Certisign_G3.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "123456");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", "./AC_Raiz_V1.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "123456");
Call call = (Call) new Service().createCall();
call.setTargetEndpointAddress(local);
call.setOperationName("esRecepcionarLoteRps");
Object[] param = new Object[]{new String("1.0"),new String("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"mensagem teste")};
String ret = (String)call.invoke(param);
System.out.println("Retorno : " + ret);