.Net 调用中国气象台Web Service
2018-08-06 22:49
246 查看
接口地址http://www.webxml.com.cn/WebServices/WeatherWebService.asmx 调用步骤:项目添加服务引用-高级-添加web引用 简单代码: web服务名.WeatherWebService w = new web服务名.WeatherWebService(); //把webservice当做一个类来操作 string[] s = new string[23];//声明string数组存放返回结果 string city = this.textBox1.Text.Trim();//获得文本框录入的查询城市 s = w.getWeatherbyCityName(city); //以文本框内容为变量实现方法getWeatherbyCityName if (s[8] == "") { MessageBox.Show("暂时不支持您查询的城市"); } else { this.GaiKuang.Text = s[1] + " " + s[6]; richTextBox1.Text = s[10]; }
相关文章推荐
- [WinForm].NET的WinForm调用Web Service
- 关于.NET中动态调用Web Service服务的方法心得。
- 摘:关于php调用.net的web service 踩过的坑
- .Net调用Java端带有WS-Security支持的Web Service各方案实战
- .net 调用web Service时集合序列化的解决方案
- 【.Net码农】WinForm如何调用Web Service
- .net调用web Service时集合序列化的解决方案
- 在.net 2.0环境下开发的web service ,支持http get方式的调用
- 在.net 2.0环境下开发的web service ,支持http get方式的调用
- 用Java调用.net的Web service
- 详解 Web service Axis2 JAVA调用.net接口 返回String的xml格式数据
- android中调用.net web service
- Java调用.net Web Service时调用不到方法的时候解决办法
- .NET应用程序中异步调用Web Service的几种方法 come from: veryhappy(wx.net)
- java调用.net的web service
- Axis调用.NET中的Web Service
- Java调用.Net的web service的几种方式
- java 调用.net Web Service
- Java调用.NET 的Web Service服务故障排除
- .NET的WinForm调用Web Service