This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I think this means the certificate sent by the server isn't trusted / known to your client.
When it works in the browser did you "accept the certificate for this session" or similar, if that's the case then it's definitely because servers certificate isn't trusted by your client.
If this is the case, you can either get the certificate from the server, and import it into the "cacerts" keystore in your jdk, or as a more amusing hack you could write a X509TrustManager implementation that always succeeds, from there, you can force your new AlwaysTrustManager to be used by the SSLContext, which can then provide the default SSLSocketFactory for HttpsURLConnection.
Something along these lines I would imagine.
I have no java certifications. This makes me a bad programmer. Ignore my post.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: trying to open a connection to a secure server (unknown certificate)