Web Service with Oracle SSO

Today, I was facing a new challenge: using Axis2 Web Service client, we need to access a User Web Service that uses Single sign-on (SSO) authentication.

With a little help of google I finally found the solution. My first problem was SSL. The Oracle SSO service is (of course) using HTTPS protocol and the server's certificate was expired. An easy fix was to download the certificate (using my Mozilla Firefox and export it), create a new truststore and use it in my test case: Create a new truststore with the server's certificate imported:

keytool -import -alias sso.cez -file sso.cez.cert -keystore cez.truststore

Specify the truststore for JSSE and its password in JVM options: -Djavax.net.ssl.trustStore=cez.truststore -Djavax.net.ssl.trustStorePassword=changeit

My second problem was the Axis2 Web Service client and the Oracle SSO service. Even if I supplied correct credentials to Axis2 Service client stub for the SSO service, I got the following exception.

more on Josef Boukal's blog