mengbo2008bj 2012年03月07日
android ksoap2调用wcf出错,急。。。。
String result = "";
SoapObject rpc = new SoapObject("http://tempuri.org/", "UserLogin");
rpc.addProperty("loginName", "aaa");
rpc.addProperty("pwd", "bbb");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.setOutputSoapObject(rpc);
HttpTransportSE ht = new HttpTransportSE("http://192.168.200.31:8022/HuoYanAgentVehicleService.svc");
ht.debug = true;
try {
ht.call("http://tempuri.org/IHuoYanAgentVehicleService/UserLogin", envelope);//这里出错
if(envelope.getResponse()!=null){
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
result = response.toString();
}
System.out.println("detail" + result);
return result;
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
System.out.println("*******"+ ht.requestDump.toString());
System.out.println("*******"+ ht.responseDump.toString());
e.printStackTrace();
}

错误描述:
org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40890440)
http://192.168.200.31:8022/HuoYanAgentVehicleService.svc为webservice可访问
那位大侠帮看看啊
...全文
367 点赞 收藏 3
写回复
3 条回复

还没有回复,快来抢沙发~

发动态
发帖子
Android
创建于2009-10-09

4.6w+

社区成员

9.0w+

社区内容

移动平台 Android
社区公告
暂无公告