1 Reply Latest reply on Apr 6, 2006 2:25 AM by Richard Merry

    Axis SSL java client

    gmeroz Newbie

      i use a java client to access a web service (JBoss.NET).
      the following code work on JBoss 3.2.6. when i run it on JBoss 4.0.3, it fails (see exception stack trace).

      when i access WS from IE, it work fine. any ideas?

      Service service = new Service();
      Call call = (Call) service.createCall();
      call.setUsername("application");
      call.setPassword("BE2080");
      call.setTargetEndpointAddress(wsURL);
      call.setSOAPActionURI("EventAccess");
      call.setOperationName("getEventNodeWithHistoryDataForChart");
      call.addParameter("in0", XMLType.SOAP_LONG, ParameterMode.IN);
      call.addParameter("in1", XMLType.SOAP_ARRAY, ParameterMode.IN);
      call.addParameter("in2", XMLType.SOAP_ARRAY, ParameterMode.IN);
      call.addParameter("in3", XMLType.SOAP_INT, ParameterMode.IN);
      call.addParameter("in4", XMLType.SOAP_INT, ParameterMode.IN);
      call.addParameter("in5", XMLType.SOAP_INT, ParameterMode.IN);
      call.setReturnType(XMLType.SOAP_STRING);
      call.invoke(new Object[]{671559401,new int[]{1,2,3,4,5,6,7,8,9},new int[]{4,0,0,0,0,0,0,0,2212},1,1,24});
      String soapMsg = call.getResponseMessage().getSOAPPartAsString();
      


      exception:
      AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
      faultSubcode:
      faultString: sun.security.validator.ValidatorException: No trusted certificate found
      faultActor:
      faultNode:
      faultDetail:
      {http://xml.apache.org/axis/}stackTrace: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
      at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
      at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
      at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
      at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
      at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
      at org.jboss.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:247)
      at org.jboss.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:166)
      at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:122)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.client.AxisClient.invoke(AxisClient.java:190)
      at org.jboss.axis.client.Call.invokeEngine(Call.java:3079)
      at org.jboss.axis.client.Call.invoke(Call.java:3064)
      at org.jboss.axis.client.Call.invoke(Call.java:2652)
      at org.jboss.axis.client.Call.invoke(Call.java:2561)
      at org.jboss.axis.client.Call.invokeInternal(Call.java:1982)
      at org.jboss.axis.client.Call.invoke(Call.java:1920)
      at com.bevents.infra.SSLTestClient.main(SSLTestClient.java:52)