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 Safdar Ali <sa...@ibmt.fhg.de> on 2004/01/30 19:57:46 UTC

Algorithm SunX509 not available

Hi,
I am trying to run a sample example of SSL......and I don't want to run the sample example for security given alongwith Axis...
I am getting the following exception when I run my client for the web service...

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
        at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
        at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:130)
        at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at HelloClient.main(HelloClient.java:26)

java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
        at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
        at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:130)
        at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at HelloClient.main(HelloClient.java:26)

My client code is this .....

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;

import javax.xml.rpc.*;
import javax.xml.namespace.QName;
import java.security.*;

public class HelloClient{
 public static void main(String[] args){
  String endpoint = "https://localhost:8443/axis/services/HelloOther";
        String method = "sayHello";
        QName op = new QName(method);
     String backString = null;
        try{
         Service  service = new Service();
         Call call = (Call)service.createCall();
         call.setTargetEndpointAddress(new java.net.URL(endpoint));
         call.setOperationName(method);
         Object params[] = new Object[1];
         params[0] = new String("Safdar");

         Object ret = call.invoke(params);
         System.out.println("From Web Service: "+ret.toString());
        }
        catch(Exception ex){
         ex.printStackTrace();
        }
 }
}

Please let me know if you know any link to sample SSL programs on Axis...Please help me asap... with thanks in advance...
Safdar.

Re: Algorithm SunX509 not available

Posted by Safdar Ali <sa...@ibmt.fhg.de>.
Didn't work either :((
  ----- Original Message ----- 
  From: G.MADHUSUDAN 
  To: axis-user@ws.apache.org 
  Sent: Friday, January 30, 2004 9:20 PM
  Subject: Re: Algorithm SunX509 not available


  Try adding 
  java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
  to your main.



    Hi,
    I am trying to run a sample example of SSL......and I don't want to run the sample example for security given alongwith Axis...
    I am getting the following exception when I run my client for the web service...
     
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
     faultSubcode:
     faultString: java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
     faultActor:
     faultNode:
     faultDetail:
            {http://xml.apache.org/axis/}stackTrace: java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
            at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
            at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:130)
            at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
            at org.apache.axis.client.Call.invoke(Call.java:2553)
            at org.apache.axis.client.Call.invoke(Call.java:2248)
            at org.apache.axis.client.Call.invoke(Call.java:2171)
            at org.apache.axis.client.Call.invoke(Call.java:1691)
            at HelloClient.main(HelloClient.java:26)
    java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
    java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available
            at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
            at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:130)
            at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
            at org.apache.axis.client.Call.invoke(Call.java:2553)
            at org.apache.axis.client.Call.invoke(Call.java:2248)
            at org.apache.axis.client.Call.invoke(Call.java:2171)
            at org.apache.axis.client.Call.invoke(Call.java:1691)
            at HelloClient.main(HelloClient.java:26)
     
    My client code is this .....
     
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import org.apache.axis.utils.Options;
     
    import javax.xml.rpc.*;
    import javax.xml.namespace.QName;
    import java.security.*;
     
    public class HelloClient{
     public static void main(String[] args){
      String endpoint = "https://localhost:8443/axis/services/HelloOther";
            String method = "sayHello";
            QName op = new QName(method);
         String backString = null;
            try{
             Service  service = new Service();
             Call call = (Call)service.createCall();
             call.setTargetEndpointAddress(new java.net.URL(endpoint));
             call.setOperationName(method);
             Object params[] = new Object[1];
             params[0] = new String("Safdar");
     
             Object ret = call.invoke(params);
             System.out.println("From Web Service: "+ret.toString());
            }
            catch(Exception ex){
             ex.printStackTrace();
            }
     }
    }
     
    Please let me know if you know any link to sample SSL programs on Axis...Please help me asap... with thanks in advance...
    Safdar. 

Re: Algorithm SunX509 not available

Posted by "G.MADHUSUDAN" <ma...@recipio.net>.
Try adding 
java.security.Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
to your main.



> Hi,
> I am trying to run a sample example of SSL......and I don't want to
> run the sample example for security given alongwith Axis...
> I am getting the following exception when I run my client for the web
> service...
>  
> AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: java.net.SocketException: Default SSL context init
> failed: Algorithm SunX509 not available
>  faultActor:
>  faultNode:
>  faultDetail:
>         {http://xml.apache.org/axis/}stackTrace:
> java.net.SocketException: Default SSL context init failed: Algorithm
> SunX509 not available
>         at
> javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
>         at
> org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:130)
>         at
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
>         at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
>         at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
>         at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
>         at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
>         at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
>         at org.apache.axis.client.Call.invoke(Call.java:2553)
>         at org.apache.axis.client.Call.invoke(Call.java:2248)
>         at org.apache.axis.client.Call.invoke(Call.java:2171)
>         at org.apache.axis.client.Call.invoke(Call.java:1691)
>         at HelloClient.main(HelloClient.java:26)
> java.net.SocketException: Default SSL context init failed: Algorithm
> SunX509 not available
> java.net.SocketException: Default SSL context init failed: Algorithm
> SunX509 not available
>         at
> javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
>         at
> org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:130)
>         at
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
>         at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
>         at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
>         at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
>         at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
>         at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
>         at org.apache.axis.client.Call.invoke(Call.java:2553)
>         at org.apache.axis.client.Call.invoke(Call.java:2248)
>         at org.apache.axis.client.Call.invoke(Call.java:2171)
>         at org.apache.axis.client.Call.invoke(Call.java:1691)
>         at HelloClient.main(HelloClient.java:26)
>  
> My client code is this .....
>  
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> import org.apache.axis.encoding.XMLType;
> import org.apache.axis.utils.Options;
>  
> import javax.xml.rpc.*;
> import javax.xml.namespace.QName;
> import java.security.*;
>  
> public class HelloClient{
>  public static void main(String[] args){
>   String endpoint = "https://localhost:8443/axis/services/HelloOther";
>         String method = "sayHello";
>         QName op = new QName(method);
>      String backString = null;
>         try{
>          Service  service = new Service();
>          Call call = (Call)service.createCall();
>          call.setTargetEndpointAddress(new java.net.URL(endpoint));
>          call.setOperationName(method);
>          Object params[] = new Object[1];
>          params[0] = new String("Safdar");
>  
>          Object ret = call.invoke(params);
>          System.out.println("From Web Service: "+ret.toString());
>         }
>         catch(Exception ex){
>          ex.printStackTrace();
>         }
>  }
> }
>  
> Please let me know if you know any link to sample SSL programs on
> Axis...Please help me asap... with thanks in advance...
> Safdar.