android调用java的webservices返回结果null
来源:互联网 发布:淘宝客服绩效考核表格 编辑:程序博客网 时间:2024/04/29 18:38
String code = "",soapAction=GlobalConts.URL_POST+methodname;
//GlobalConts.URL_POST:http://ws.syzs.newland.com/
//methodname=validateUserInfo
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
SoapObject request = new SoapObject(GlobalConts.URL_POST, methodname);
try {
request.addProperty("UserId", uname);
request.addProperty("Id", uid);
request.addProperty("password", upwd);
// request.addProperty("filestrs", tag);
envelope.bodyOut = request;
envelope.dotNet = false;
envelope.encodingStyle = "UTF-8";
envelope.setOutputSoapObject(request);
} catch (Exception e1) {
// TODO Auto-generated catch block
Log.e("Error", "1");
}
try {
AndroidHttpTransport ht = new AndroidHttpTransport(GlobalConts.URl_File);
ht.debug = true;
ht.call(soapAction, envelope);
if (envelope.getResponse() != null) {
SoapObject result = (SoapObject) envelope.bodyIn;
// String name = result.getProperty(0).toString();
// Object detail = (Object) result.getProperty(0);
if (result != null) {
code = result.toString();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return code;
调用webservices结果ht.call(soapAction, envelope);返回空。调试了好多遍,不知道什么原因。测试平台android4.4+求大神帮忙。谢谢。
0 0
- android调用java的webservices返回结果null
- vb 调用java的webServices
- android调用系统相机返回null的bug
- Android在fragment中调用getacvitity()返回null的解决方法
- android 调用系统相机拍照,返回的data为null
- Java调用Document.getElementById方法返回null的解决办法
- Android手机调用笔记本电脑的webservices
- Java与.NET的WebServices相互调用
- Java与.NET的WebServices相互调用
- Android调用系统添加和编辑联系人的返回结果
- Android 调用系统相机拍照的返回结果
- java调用oracle返回结果集的存储过程
- Android调用WebServices
- java调用webservices
- java调用.net webservices
- android调用系统联系人返回联系人结果,
- java调用ORACLE函数返回结果集
- java 调用oracle函数返回结果集
- 求教:如何通过JNI调用手机自身摄像头录像并处理图片?
- android去掉ExpandableListView的group中的child的默认边框
- AndroidStudio运行时报告Empty test suite
- 关于imageview 点击事件
- android新手,一个破功能搞了一天
- android调用java的webservices返回结果null
- android studio 连接 asp.net ashx
- Android开发在代码中控制view的显隐时,界面滚动条滚动
- setting中switchpreference问题
- 我这里图片上传后怎么才能让图片的路径自动保存到数据库??
- 用httpclient发动请求到服务器的问题
- asp 读取 json 列表
- Android eclipse project->clean后原本能运行的app出错了
- 学习android系统