WCF proxy generation: svcutil.exe vs wsdl.exe

此生再无相见时 提交于 2019-12-03 18:45:51

问题


I have .wsdl and .xsd files from WebService and need to generate proxy by them. Svcutil.exe and wsdl.exe generate very different output. What is the difference between these two tools for proxy generation and which way is more preferable?


回答1:


Svcutil and wsdl are two different technologies for generating a proxy for consuming your service. But wsdl.exe was made for old .NET 2.0 web services. It is like old version of svcutil. Svcutil allows you to generate proxies for both - web services and WCF services. For generating a proxy wsdl retieves the data by means of DISCO discovery protocol. Svcutil also supports DISCO. But it can make the proxy retrieval using WS-Metadata Exchange protocol, which is an interopable standart of SOA.

I advice you to use svcutil because it would allow you to consume both .net 2.0 web services and wcf services.




回答2:


For what i know today wsdl is useful when you must generate a client code for an old version of the framework. For example when you have a codebase in NET 2.0 and you want call a WCF service.



来源:https://stackoverflow.com/questions/18311816/wcf-proxy-generation-svcutil-exe-vs-wsdl-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!