我'的Restlet框架2.1.2,從我的Android應用程序,我試着檢索WCF數據服務數據和收到的logcat錯誤消息從WCF數據服務檢索$元數據:Android的 - 不能使用
Starting the HTTP client Get the metadata for http://Server.domain.local:82/northdata.svc/ at http:// Server.domain.local:82/northdata.svc/$metadata GC_CONCURRENT freed 1154K, 56% free 2966K/6727K, external 1625K/2137K, paused 4ms+6ms Can't get the metadata for http://Server.domain.local:82/northdata.svc/ java.io.IOException: Unable to create customized SAX source ...
我的腳步,我 允許清單文件INTERNET權限:
uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
我取代HTTP客戶端:
Engine.getInstance().getRegisteredClients().clear();
Engine.getInstance().getRegisteredClients().add(new HttpClientHelper(null));
和使用StrictMode:
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
我用的AsyncTask,我的代碼:
protected String doInBackground(Object... params) {
{
try {
NorthdataService service = new NorthdataService();
Query<Customers> queryCustomers = service
.createCustomersQuery("/Customers");
}
} catch (Exception e) {
// return e;
}
return customers;
}
什麼可能呢?我如何檢查\從$元數據獲取數據?
P.S.我在Android內部瀏覽器中打開了我的數據服務鏈接,它打開了。