C# 调用Webservice实例
详细过程
1.得到webservice地址:例如 http://xxx.xxx.x.xxx:xxxx/xxxx.asmx
2.打开vs编译器命令行 【一般位于:开始菜单-Visual Studio XXXX-Visual Studio Tools 中】
3.执行 wsdl /language:c# /n:platService /out:d:\platService.cs http://xxx.xxx.x.xxx:xxxx/xxxx.asmx?wsdl
[
/n: 后接自己声明的命名空间名称
/out: 后接代理类的保存路径+空格+webservice地址+?wsdl
]
4.右键项目解决方案,添加对应保存路径的cs至项目。
5.实例化,调用具体方法。