[jbossws-users] [JBossWS] - Re: Help using Client Certificates with Web Services
hitman_in_wis
do-not-reply at jboss.com
Fri Jan 19 15:15:02 EST 2007
Use this guide. I have extremely limited knowledge of Webservices and SSL, and I was able to get my java client talking to my WS thru SSL using it:
http://java.sys-con.com/read/216388.htm
The only confusing part of the guide is at the end where he instructs you to create your own SSLSocketFactory for Axis to use. He references Listing 5, but the code referenced is not a complete class. What I did was encapsulated the code in a new class:
public class MySocketFactory extends JSSESocketFactory {
| ... code from Listing 5 ...
| }
You will get one compile error on the line that says:
factory = context.getSocketFactory();
Simply change 'factory' to sslFactory, which is inherited from JSSESocketFactory.
Then, in order to have Axis use your new SSLSocketFactory, you simply need to set the system property: "axis.socketSecureFactory" to "com.****.MySocketFactory"
Hope that helps!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004021#4004021
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004021
More information about the jbossws-users
mailing list