您的位置:首页 > 编程语言 > ASP

Asp.Net中WebServices的调用方式

2015-07-18 22:31 525 查看
  在web.config中这样配置要引用的WebServices

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="VoteSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:1234/Vote.asmx" binding="basicHttpBinding"
bindingConfiguration="VoteSoap" contract="Vote.VoteSoap" name="VoteSoap" />
</client>
</system.serviceModel>


中间还有一些操作。。。

  然后在需要应用的类中引入命名空间,然后就可以调用这个webservices,并用它提供的方法了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: