0
遷移到ADF Mobile 11.1.2.4後,RestServiceAdapter庫無法連接到URL或加載調用URL的頁面。在ADF Mobile 11.1.2.4.0中使用RestServiceAdapter
RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
restServiceAdapter.clearRequestProperties();
restServiceAdapter.setConnectionName("twitter");
restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);
restServiceAdapter.setRetryLimit(0);
restServiceAdapter.setRequestURI("/search.json?q=OC_WIRE");
String response = "";
try {
response = restServiceAdapter.send("");
} catch (Exception e) {
System.out.println("Error...");
}
此代碼在ADF Mobile 11.1.2.3中正常工作。 感謝您的答覆
嘗試直接打在URL中使用HTTP分析儀。如果它在那裏沒有成功,那麼它可能是你的代理設置的問題。 – Paddy 2014-06-11 06:55:14