VS2010 can t create a web service reference from some WSDLs. Have
to write custom wrapper for those. OR edit your WSDL in a way so
VS can consume it. For example it may be ok for you to remove web
service method references for the methods that you are not planning to
use if those references create trouble for you.
除非您重新使用.NET 2. 0, 否则您不应该使用ASMX网络服务技术。
您应该使用“ 添加服务引用” 并将其指向磁盘上的 WSDL。 它会创建一套“ 代理” 类, 其方法可以被称为“ 正常” 类 。
见“”http://johnwsaunders3.wordpress.com/2009/05/17/how-to-consume-a-web-service/" rel=“不跟随 nofollow norefererr'>“如何设置网站服务 ”, 以作为实例进行步行。
使用 < a href=" "http://msdn.microsoft.com/en-us/library/7h3ystb6.aspx" rel = "nofollow noreferrer">WSDL.EXE wiltive 来生成来自 WSDL 的网络服务代理 。
例如:
wsdl /language:CS /n:"Microsoft.SqlServer.ReportingServices2010" http://<Server
Name>/reportserver/reportservice2010.asmx?wsdl
< a href=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ref:
WSDL and consume web service
consume non .NET webservice through WSDL file
How to use a WSDL