@Override protected Object doInBackground(String... params) { type = params[0]; page = Integer.valueOf(params[1]); try { DocNotEncrySoapBody soap = new DocNotEncrySoapBody(); soap.setMethod("getPushHistoryByIsRead"); soap.putValues("account", DocGlobalVars.getInstance().me.name); soap.putValues("isRead", params[0]); soap.putValues("pageIndex", params[1]); soap.putValues("pageSize", "20"); String xmlString = DocHttpUtils.getInst() .getStringBySoap( getActivity(), DocGlobalVars.getInstance().URL_DOC_MESSAGE_CENTER_SETTING, soap, "utf-8"); if (xmlString == null) { return null; } Log.d("", xmlString); ArrayList<DocMessageBean> messageBeans = DocPushMessageParser.parser(xmlString); return messageBeans; } catch (DocErrorMsg e) { e.printStackTrace(); } return null; }
@Override protected Object doInBackground(String... params) { try { if (getActivity() == null) { return null; } DocNotEncrySoapBody soap = new DocNotEncrySoapBody(); soap.setMethod("readMessageById"); soap.putValues("id", params[0]); String xmlString = DocHttpUtils.getInst() .getStringBySoap( getActivity(), DocGlobalVars.getInstance().URL_SETTING, soap, "utf-8"); if (xmlString != null) { Log.d("", xmlString); } } catch (DocErrorMsg e) { e.printStackTrace(); } return null; }