Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an HTTPS call on App Engine

My app queries other web services via SSL. I've used Apache HttpClient to create https POST calls on my server to other web services. When I deployed my app to App Engine I got the following error:

java.lang.NoClassDefFoundError: javax.net.ssl.KeyManagerFactory is a restricted class. 
Please see the Google App Engine developer's guide for more details.

My question is, how can I make HTTPS calls on Google App engine?

like image 381
siamii Avatar asked Mar 05 '26 17:03

siamii


1 Answers

Apache HttpClient is not supported out-of-the-box by App Engine. You will have to write a custom ConnectionManager that wraps UrlFetch. This post explains it pretty well and provides you with sample code. I used that code successfully on App Engine before.

like image 57
Benjamin Muschko Avatar answered Mar 07 '26 07:03

Benjamin Muschko