Fix for java sdk to force the use of suns https Handler

There are some problems using the sdk in application servers eg. Weblogic.

This pull request fixes 2 problems.
1. It forces the use of Suns Https handler.
2. It null checks values before setting the RequestProperty.

Comments :
1. imho the sdk should support Client certificates when constructing the Truststore. This is not included in the pull request since it would require api changes.
2. The sdk might declare better dependencies. I have to declare dependencies on

groupId   -> org.codehaus.woodstox</groupId>
artifactId -> stax2-api
version   -> 3.1.1

groupId   -> org.codehaus.woodstox</groupId>
artifactId -> woodstox-core-asl
version   -> 4.1.5

To be independent on jdk/app server library.