2012-05-22 70 views
1

我下載了XMLRPC client project並嘗試初始化到我的XMLRPC服務器的連接。XMLRPC Java Android客戶端

我設置了一個本地服務器進行測試並使用http://10.0.2.2:8080/OpenConf_Server-0.0.1/來調用rpc。

每次我打電話給我的測試方法,只返回一個簡單的字符串,我收到XMLRPC客戶端的以下錯誤消息。

什麼問題?

05-22 16:08:27.503: E/OpenConfDashboardDesignActivity(759): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {null}methodResponse (position:START_TAG <html>@4:7 in [email protected]) 

回答

0

嘗試添加更多日誌記錄,很可能它是服務器的路徑不正確。

} catch (final XMLRPCFault e) { 
      // TODO: do something with message.contains 
      Log.i(TAG, "XMLRPCFault : " +e.toString()); 
      String message = e.getMessage(); 
      if (message.contains("<html>")) { 
       Log.i(TAG, MessCon" : " +e.toString()); 
       return null; 
      } 
     } catch (XMLRPCException e) { 
      Log.i(TAG, " XMLRPCException : " +e.toString()); 
      return null; 
     } 
     Log.i(TAG, " respnse : " + response); 
     return response;