我的应用程序通过 SSL 查询其他网络服务。我已经使用 Apache HttpClient 在我的服务器上创建对其他 Web 服务的 https POST 调用。当我将我的应用程序部署到 App Engine 时,出现以下错误:
java.lang.NoClassDefFoundError: javax.net.ssl.KeyManagerFactory is a restricted class.
Please see the Google App Engine developer's guide for more details.
我的问题是,如何在 Google App 引擎上进行 HTTPS 调用?
最佳答案
不支持 Apache HttpClient out-of-the-box由应用引擎。您将必须编写一个包装 UrlFetch 的自定义 ConnectionManager . This post很好地解释了它并为您提供了示例代码。我之前在 App Engine 上成功地使用了该代码。
关于java - 如何在 App Engine 上进行 HTTPS 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6977201/