axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Roch <jro...@csc.com>
Subject Axis client and SSL: Unrecognized SSL message
Date Fri, 25 Mar 2005 17:01:11 GMT





Hi all,

I used WSDL2Java to generate a client that calls a web service over SSL.
The WS is deployed on my local host in tomcat.
The command that I used for this is the following:
java -Djavax.net.ssl.trustStore="D:\Java\j2sdk1.4.1
_02\jre\lib\security\myKeyStore" -cp %JAVA2WSDL_CLASSPATH%
org.apache.axis.wsdl.WSDL2Java
https://jroch2-01:8443/axis/services/HelloWorld?wsdl.
I first had some certificate problems but now the client generation works
fine.
I can also see that the URL is correct in the locator class:
private java.lang.String HelloWorld_address =
"https://jroch2-01:8443/axis/services/HelloWorld";

So I created a simple client as following:

System.setProperty("javax.net.ssl.trustStore","D:/Java/j2sdk1.4.1
_02/jre/lib/security/myKeyStore");
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

HelloWorldServiceLocator locator = new HelloWorldServiceLocator();
try{
      HelloWorld hello = locator.getHelloWorld();
      hello.getHelloWorldData("test");
   }catch(Exception e){
      e.printStackTrace();
   }

When I run this, I have the following error:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: javax.net.ssl.SSLException: Unrecognized SSL message,
plaintext connection?
 faultActor:
 faultNode:
 faultDetail:
      {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException:
Unrecognized SSL message, plaintext connection?
      at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA6275)
      at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
      at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
      at
org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
      at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:131)
      at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:370)
      at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:88)
      at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
      at org.apache.axis.client.AxisClient.invoke(AxisClient.java:147)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
      at org.apache.axis.client.Call.invoke(Call.java:2702)
      at org.apache.axis.client.Call.invoke(Call.java:2378)
      at org.apache.axis.client.Call.invoke(Call.java:2301)
      at org.apache.axis.client.Call.invoke(Call.java:1758)
      at
jroch2_01.axis.services.HelloWorld.HelloWorldSoapBindingStub.getHelloWorldData(HelloWorldSoapBindingStub.java:149)
      at TestFwk.test2(TestFwk.java:59)
      at TestFwk.main(TestFwk.java:68)

      {http://xml.apache.org/axis/}hostname:JROCH2-01

Can somebody help me ?

Thx a lot,
Johan.


Mime
View raw message