Friday, October 9, 2009

Configuring Https in Axis2

If a client is connecting a https server, he has to trust the certificate of the server, and the developer has to provide the trusted certificates to the client. http://ws.apache.org/axis2/1_5/http-transport.html is the closest reference I found, which basically says look at httpclient configurations, and also thread http://www.opensubscriber.com/message/axis-dev@ws.apache.org/8077606.html discusses how to do this.

Basically Axis2 depends on commons http client security and it uses JSSE security. So setting following properties will do. However, httpclient also provides more deeper control.

System.setProperty("javax.net.ssl.trustStore",
"/data/playground/ebay-sept30/wso2esb-2.1.0/resources/security/client-truststore.jks");
System.setProperty("javax.net.ssl.trustStorePassword","wso2carbon");