Hand shake exception is caused due to
java not being to handle SSL connections by default.
As per my understanding when you open a secure internet connection over https you need to
exchange certificates which the server uses to identify the caller and so that the security of the transferred information can be ensured.
Also this is a session specific thing.
I have had the problem when working with websphere and these are the settings I do to solve it.
You need to know who you are talking to and use an appropriate handler. May be there is some sort of generic handler that can be used for all https connections.