没搞过,我都是调用ashx,把数据变成json格式
解决方案 »
- android注入.so时遇到error: undefined reference to 'dlopen'
- 有人知道os4.1中,如何判断是否变更了SD卡保护选项么?
- Android应用App之间通信
- 退出Activity问题
- 为什么我的代码实现不了利用Handler和message机制来实现WelcomeView到GameView的跳转啊,请大侠帮忙
- 为什么android中的UI视图更新不能放在子线程中
- sipdroid编译so问题,求解答
- android源码编译出错
- Android的异常有没有好的解决办法啊
- 为什么animation没有set方法设置属性?
- intent在传值方面有比bundle好的地方么?
- 菜鸟求助!listview的notifyDataSetChanged问题
SoapObject result = (SoapObject) envelope.bodyIn;
SoapObject detail = (SoapObject) result.getProperty(METHOD_NAME);
for (int i = 0; i < detail.getPropertyCount(); i++) {
SoapObject mstr = (SoapObject) detail.getProperty(i);
String str_result = mstr .getProperty(0).toString();
list.add(str_result); //这个你要的
}
public List<Map<String, Object>> jsonToArray(String json) {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
try {
JSONObject jsonobj = new JSONObject(json);
JSONArray ary = jsonobj.getJSONArray("result");
for (int i = 0; i < ary.length(); i++) {
JSONObject obj = (JSONObject) ary.opt(i);
Map<String, Object> map = new HashMap<String, Object>();
map.put("rid", obj.getString("rid"));
map.put("name", obj.getString("name"));
map.put("wk", obj.getString("wk"));
map.put("wboxoffice", obj.getString("wboxoffice"));
map.put("tboxoffice", obj.getString("tboxoffice"));
list.add(map);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list;
}