无法在Worklight 6.2,6.3中获取HTTP响应

时间:2015-03-06 07:13:10

标签: java android rest ibm-mobilefirst mobilefirst-adapters

错误:WLNativeXHRPlugin $ NativeXHRPostListener.onException

03-06 12:35:07.406: D/NONE(10503): Transfer failed, errors = {"invocationContext":null,"errorCode":"REQUEST_TIMEOUT","errorMsg":"Request timed out for http://192.168.85.1:10080/RestServiceCommunication/apps/services/api/RestServerCommunivation/android/query. Make sure the host address is available to the application (especially relevant for Android and iPhone apps)."}
03-06 12:35:07.526: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(10503): WLNativeXHRPlugin$NativeXHRPostListener.onException in WLNativeXHRPlugin.java:137 :: onException
03-06 12:35:07.526: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(10503): org.apache.http.conn.ConnectTimeoutException: Connect to /192.168.85.1:10080 timed out
03-06 12:35:07.526: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(10503):     at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
03-06 12:35:07.526: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(10503):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
03-06 12:35:07.526: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(10503):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)

该设备是android 4.3,4.4.2,5.02

1 个答案:

答案 0 :(得分:0)

根据错误日志,您确定后端是否可用?

  • 是否在预览中工作?
  • 您确定该设备能够连接到MobileFirst服务器吗?
  • 确保服务器向公共互联网公开
  • 增加过程超时(在适配器XML中的应用程序代码和适配器过程上)