首页 新闻 搜索 专区 学院

android用调用webservice老是报错,求解

1
解决于 2012-02-06 17:15

 每次在13行报这个错误java.lang.ClassCastException: org.ksoap2.SoapFault

涉及代码

 

 1             System.out.println("rpc------");
2 SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
3 System.out.println("rpc" + rpc);
4 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
5 envelope.bodyOut = rpc;
6 envelope.dotNet = true;
7 envelope.setOutputSoapObject(rpc);
8 HttpTransportSE ht = new HttpTransportSE(URL);
9 //AndroidHttpTransport ht = new AndroidHttpTransport(URL);
10 ht.debug = true;
11 ht.call(SOAP_ACTION, envelope);
12 ht.call(null, envelope);
13 SoapObject result = (SoapObject)envelope.bodyIn;
14 System.out.println("result" + result);



codebird的主页 codebird | 初学一级 | 园豆:154
提问于:2012-02-03 20:15
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册