users@jersey.java.net

[Jersey] Jersey 2 client rest help with SSL

From: Kevin Duffey <andjarnic_at_yahoo.com>
Date: Tue, 25 Jun 2013 08:48:25 -0700 (PDT)

Hi all,

I am trying to work with the Paypal Rest API, and can't get past the first call to get an access token. I am posting a form with one parameter to https://api.sandbox.paypal.com/v1/oauth2/token. The response I get back is 406.. thus my mediatype is correct and headers are correct, but the body I am sending in is not being accepted. I've followed the example on the Jersey 2 documentation on how to post a form. 

At this point, my one thought is that the URL is https and that I am sending it without any SSL context. 

So, I do not quite understand what is involved in setting up a client side SSL cert and how I go about it using it with Jersey. Jersey 2 is so new there isn't any examples I can find. Can anyone point me to a url or two that explains how I would set up my client side with a proper SSL cert..preferably something free for development use?

I also want to make sure that this can be done on my web server (Glassfish 4) so that I can make the api calls from my web app once deployed. In other words, my JEE7 web app is using Jersey client to make rest calls to paypal on behalf of my app users.

Thank you.