解决方案 »
- android无线点餐系统
- 关于html5在andriod上开发的问题(我是小白)
- 网易客户端消息推送
- android系统下,想实现软件关机功能.
- HttpClient数据下载不全
- 自定义View实现转盘旋转效果
- Android2.2与2.3 MediaScanner的区别是什么,可否讲解一下两者的原理
- 使用WebView做软件界面,那么如何获取Web页面的值呢
- 关于TrafficStats.getUidRxBytes(Uid))和 TrafficStats.getUidTxBytes(Uid));
- Listview是如何确定哪个布局是他的布局子项?
- 再自己的应用中引用百度离线地图
- android 环境搭建出问题
这是 我的服务器程序public class myio
{
public String get_result(String from)
{
return "张三是"+from;
}
}这是我新改的Android端程序
public void getWeather(String cityName) {
try {
SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
rpc.addProperty("the_result", "白痴");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.setOutputSoapObject(rpc);
HttpTransportSE ht = new HttpTransportSE(URL);
//AndroidHttpTransport ht = new AndroidHttpTransport(URL);
ht.debug = true;
ht.call(SOAP_ACTION, envelope);
//ht.call(null, envelope);
//SoapObject result = (SoapObject)envelope.bodyIn;
//detail = (SoapObject) result.getProperty("getWeatherbyCityNameResult");
detail =envelope.getResponse();
//System.out.println("result" + result);
System.out.println("detail1:" + detail);
System.out.println("detail2:" + detail.toString());
// Toast.makeText(this, detail.toString(), Toast.LENGTH_LONG).show();
return;
} catch (Exception e) {
e.printStackTrace();
}
}
但是,返回结果是:
detail1:张三是NULL
detail2:张三是NULL
不是我期待的设置的值,再次求指教
envelope.dotNet = true;
应该设为false, .net下才设置为true
参考链接1:http://bbs.csdn.net/topics/370122236
参考链接2:http://blog.sina.com.cn/s/blog_980024ca01015qxl.html