I wasn't able to do this just by setting the global parameters you
mention.  The truststore paramters you set will help you to make the
server is who you think it is, but you'll have to do some work to get
the client to pass a certificate.  
 
There's a library in not-yet-commons that will help:
AuthSSLProtocolSocketFactory.  In my case, I used the generated code
just to create the envelope and then used my own HTTPClient with that
library to produce the desired results.  
 
I think someone else has mentioned on here there's a way to configure
the service client in the stub to use the protocol that you generate
with the factory class rather than producing your own HTTPClient.

________________________________

From: Deep Chand [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 24, 2007 10:27 AM
To: [email protected]
Subject: Changes in axis client for Mutual Authentication


all gurus,

I have a web service client developed using axis i.e. Ran WSDL2Java on
WSDL
to generate the client stubs and then filled in the logic to access the
web
service exposed by soap server. Everything works fine. 

I want to add mutual authentication (2 way TLS authentication) to this
existing web service communication. I've the access to client and server
certificates. What changes do I need to make in the client? 

What I understand from googling is:

1) I read that I need to set some system properties like

javax.net.ssl.keyStoreType,
javax.net.ssl.keyStore,
javax.net.ssl.keyStorePassword,
javax.net.ssl.trustStoreType ,
javax.net.ssl.trustStore
javax.net.ssl.trustStorePasswo
rd

2) Use https instead of http while invoking the web service.

Is that all I need to do or some thing else? Do I need to set these
system
properties while running the wsdl2java utility or in the client code at
the
time of invoking the web service. please reply

any help is appreciated.

thanks,
deep


Reply via email to