You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Makam, Chethan" <ch...@verizon.com> on 2004/04/28 22:27:51 UTC
WS Client for Service running over ssl
I am trying to write a client to make a call to the Web Service running
on SSL. I saved the certificate and imported it using keytool. Since I
do not have root permissions, I have imported it to /tmp/cacerts . In my
client I am doing the following:
Sprt_Service_Request_CPEService service = new Sprt_Service_Request_CPEServiceLocator();
System.setProperty("java.protocol.handler.pkgs", com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("javax.net.debug", "all");
String urlStr ="https://realservername.com/arsys/services/ARService?server=realserve
rname&webService=3D3Dsprt_Service_Request_CPE";
endPoint = new URL(urlStr);
Sprt_Service_Request_CPEPortType port = service.getsprt_Service_Request_CPESoap(endPoint);
System.setProperty("javax.net.ssl.keyStore", "/tmp/cacerts");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("javax.net.ssl.trustStore", "/tmp/cacerts");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
But when i run this, I get the following error:
[java] 2004-04-28 15:26:00,863 INFO org.apache.axis.enterprise -
Mapping Exception to AxisFault
[java] AxisFault
[java] AxisFault
[java] faultCode:
{http://xml.apache.org/axis/}Server.userException
[java] faultCode:
{http://xml.apache.org/axis/}Server.userException
[java] faultString: java.io.IOException: Write Channel Closed,
possible SSL handshaking or trust failure
[java] faultString: java.io.IOException: Write Channel Closed,
possible SSL handshaking or trust failure
[java] faultActor: null
[java] faultActor: null
[java] faultDetail:=3D20
[java] faultDetail:=3D20
[java] stackTrace: java.io.IOException: Write Channel Closed, =
=3D
possible SSL handshaking or trust failure
FYI
1) I used axis 1.0 WSDL2JAVA for generating stubs...
2) I am running this client from a solaris box
I am not sure where I am going wrong. Any help is greatly Appreciated.
Thanks,
Chethan