This works if you have JSSE installed (included in JDK 1.4). See
documentation at http://java.sun.com/products/jsse/. 

In short, set the following System properties:
        java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
        javax.net.ssl.keyStore=<keystore_file>
        javax.net.ssl.keyStoreType=JKS
        javax.net.ssl.keyStorePassword=<keystore_password>
        javax.net.ssl.trustStore=<truststore_file>
        javax.net.ssl.trustStoreType=JKS
        javax.net.ssl.trustStorePassword=<truststore_password>

Both the truststore and the keystore are Java Keystores, i.e. containers of
keys and certificates. The truststore contains trusted certificates, i.e.
trusted issuers of certificates (CA). The keystore contains your private key
and the associated public key certificate. The keystore is only necessary if
you are using client-authentication & SSL (which isn't so common).

/Christer

> -----Original Message-----
> From: Becker, Torsten [mailto:[EMAIL PROTECTED]]
> Sent: den 17 december 2002 10:56
> To: '[EMAIL PROTECTED]'
> Subject: AW: Axis and SSL
> 
> 
> If you're using SSL in your Client, you have to setup some security
> parameters. I'm using Tomcat as well and placed the following 
> lines into my
> code.
> 
> System.setProperty("javax.net.ssl.trustStore","/usr/...... 
> the place where
> your key's are ");
> System.setProperty("java.protocl.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol");
> Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
> 
> Torsten
> > -----Ursprüngliche Nachricht-----
> > Von:        Michael D. Spence [SMTP:[EMAIL PROTECTED]]
> > Gesendet am:        Dienstag, 17. Dezember 2002 04:50
> > An: [EMAIL PROTECTED]
> > Betreff:    Axis and SSL
> > 
> > Tomcat's able to do SSL just fine.  And I can connect to 
> and use my web
> > service just fine.  But when I change the URL from
> > http://localhost:8080/axis/services/Myservice to
> > https://localhost:8443/axis/services/Myservice, I get the 
> error below.
> > Anybody
> > got any advice?
> > 
> > 
> > 
> > INFO: Mapping Exception to AxisFault
> > AxisFault
> >  faultCode:
> > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> >  faultSubcode:
> >  faultString: java.lang.NullPointerException
> >  faultActor: null
> >  faultNode: null
> >  faultDetail:
> >         stackTrace: java.lang.NullPointerException
> >         at
> > 
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:1
> > 57)
> >         at
> > 
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
> > 
> >         at
> > 
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
> > y.java:71)
> >         at 
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
> >         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
> >         at 
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
> >         at org.apache.axis.client.Call.invokeEngine(Call.java:2376)
> >         at org.apache.axis.client.Call.invoke(Call.java:2365)
> >         at org.apache.axis.client.Call.invoke(Call.java:2062)
> >         at org.apache.axis.client.Call.invoke(Call.java:1986)
> >         at org.apache.axis.client.Call.invoke(Call.java:1509)
> >         at
> > 
> com.echo.NCNSS.IF.NFMSvcSoapBindingStub.connect(NFMSvcSoapBindingStub
> > .java:193)
> >         at soaptester.Frame1.jbInit(Frame1.java:110)
> >         at soaptester.Frame1.&lt;init&gt;(Frame1.java:50)
> >         at soaptester.soaptest.&lt;init&gt;(soaptest.java:20)
> >         at soaptester.soaptest.main(soaptest.java:49)
> > 
> > 
> > java.lang.NullPointerException
> >         at org.apache.axis.AxisFault.makeFault(AxisFault.java:127)
> >         at
> > 
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
> > 
> >         at
> > 
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
> > y.java:71)
> >         at 
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
> >         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
> >         at 
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
> >         at org.apache.axis.client.Call.invokeEngine(Call.java:2376)
> >         at org.apache.axis.client.Call.invoke(Call.java:2365)
> >         at org.apache.axis.client.Call.invoke(Call.java:2062)
> >         at org.apache.axis.client.Call.invoke(Call.java:1986)
> >         at org.apache.axis.client.Call.invoke(Call.java:1509)
> >         at
> > 
> com.echo.NCNSS.IF.NFMSvcSoapBindingStub.connect(NFMSvcSoapBindingStub
> > .java:193)
> >         at soaptester.Frame1.jbInit(Frame1.java:110)
> >         at soaptester.Frame1.<init>(Frame1.java:50)
> >         at soaptester.soaptest.<init>(soaptest.java:20)
> >         at soaptester.soaptest.main(soaptest.java:49)
> > Caused by: java.lang.NullPointerException
> >         at
> > 
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:1
> > 57)
> >         at
> > 
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
> > 
> >         ... 14 more
> > 
> > Michael D. Spence
> > Mockingbird Data Systems, Inc.
> > 
> 

Reply via email to