Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTPS Rest Call using Jersey 2.4 to LinkedIn Rest Service API

 
Steven Romero
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been trying to make a Java Rest Program that can read JSON from the LinkedIn Rest Service API. The LinkedIn Rest Service API uses HTTPS. I have used Firefox to obtain the LinkedIn HTTPS Cert as a .pem file, and imported it into a file call .keystore. I use Jersey's Client API to call the service passing it that same .keystore file. Despite all this I am still getting the same HTTP 401 Unauthorized Exception. I have very little experience when dealing with keystores, truststores, and https call, I would appreciate any help. I have posted relevant the code below. Is there anything I need to change?, Is anyone familiar with the SslConfigurator class of JAX-RS 2.4? Or the LinkedIn Rest Service API. I have tested the LinkedIn Rest API on Postman with an active access token and had no issues.


 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites (Cross posted).

Did you try the proper initialization of SslConfigurator as described in the documentation?
 
Steven Romero
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My bad on the cross-posting (never really understood why it is a problem). That was the first thing I did, and I believe I have configured it according to the doc. I have followed all the proper procedures for importing the CA to the trustStore, and having SSLConfigurator read that. This is a new api, so I may just have to wait for better documentation, or for tutorials online.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic