HTTPS连接工作灯服务器6.2 [英] HTTPS Connection to Worklight Server 6.2

查看:131
本文介绍了HTTPS连接工作灯服务器6.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发利用工作灯6.2应用程序针对Android和iOS,这应该连接到应用程序启动的工作灯服务器时。我做了以下步骤。

  1. 在WL6.2开发的应用程序
  2. 已启用的connectOnStartup参数为真。
  3. 新增的Andr​​oid环境
  4. 运行工作灯开发服务器上的应用程序。
  5. 在使用现在打开工作灯控制台的https:// IP:10080 / worklightconsole ,应用程序工作正常
  6. 因为我需要https连接,我打开了工作灯控制台,的https:// IP:10043 / worklightconsole 。控制台成功打开并工作正常。
  7. 现在,我是部署在Android模拟器的应用程序,并尝试连接的工作灯服务器的HTTP连接。该应用程序可以能够与工作灯服务器连接。
  8. 如果应用程序试图连接到工作灯服务器以https,它抛出下面的错误。
  

错误:应用程序无法连接到该服务

在logcat的是这里

解决方案

请参阅我的答案在这里,专门编辑。如果你只是想在内部测试SSL连接,你必须创建自己的证书,所以看我的回答就怎么做,这样的问题。当你拥有它,你必须让你的设备是否信任该服务器证书,因此,再次,看我的说明答案。

最后,当你要生产,就必须获得来自受信任的证书颁发机构(CA)如Verisign的证书,否则,你的应用程序的安装就不会信任你的证书,将无法连接设备

I have developed a app using worklight 6.2 targeting android and iOS, which should connect to the worklight server when the app starts. I did the following procedure.

  1. Developed an app in WL6.2
  2. Enabled the connectOnStartup parameter as true.
  3. Added android environment
  4. Run the app on worklight development server.
  5. Now opened the worklight console using https://ip:10080/worklightconsole, the app is working fine.
  6. Since i need https connection, i opened the worklight console as, https://ip:10043/worklightconsole. The console successfully opened and working fine.
  7. Now i am deployed the app on android emulator, and trying to connect the worklight server with http connection. The app can able to connect with worklight server.
  8. If the app is trying to connect to the worklight server with https, it is throwing the following error.

Error: The application failed connecting to the service.

The logcat is here

解决方案

Please see my answer here, specifically the edit. If you just want to test your SSL connection internally, you will have to create your own certificate, so look at my answer to that question on how to do so. After you have it, you have to make your device trust that server certificate, so, again, look at my answer for the instructions.

Eventually, when you are going to production, you have to acquire a certificate from a trusted Certificate Authority (CA) such as Verisign, otherwise the devices where your application is installed will not trust your certificate and will not be able to connect.

这篇关于HTTPS连接工作灯服务器6.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆