android连接webservice(通用,可使用复杂返回值)
本文为原创,转载请注明出处:http://blog.csdn.net/zhyl8157121/article/details/8709048
首先,说一下适用范围:
1.HttpConnSoap
HttpConnSoap2 webservice = new HttpConnSoap2();String methodName = "showReview";//方法名ArrayList<String> paramList = new ArrayList<String>();ArrayList<String> parValueList = new ArrayList<String>();ArrayList<CommentInfor>() resultList = new ArrayList<CommentInfor>();paramList.add ("ID");//指定参数名parValueList.add ("001");//指定参数值InputStream inputStream = webservice.GetWebServre (methodName, paramList, parValueList);resultList = XMLParase.paraseCommentInfors (inputStream);
PS:最好别要加QQ啊,QQ聊天的速度太快,我怕我一着急想不出来~~~
更重要的,回复和邮件可以装作没看见~(稍后回复),哈哈。