Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF proxy generation: svcutil.exe vs wsdl.exe

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?

like image 243
Sergey Moshkov Avatar asked Aug 19 '13 10:08

Sergey Moshkov


People also ask

What is SVCUtil exe used for?

Svcutil.exe can be used to download metadata from running services, and save the metadata to local files. To download metadata, you must specify the /t:metadata option. Otherwise, client code is generated. For HTTP and HTTPS URL schemes, Svcutil.exe attempts to retrieve metadata using WS-Metadata Exchange and DISCO.

How do I create a proxy class in WSDL?

After creating the directory we will write a Proxy class by “wsdl” command on a specified location. Just write wsdl and paste your URL that was copied from the web browser of the web service file . asmx and press Enter to create it. It will create a Proxy class on the selected location.


1 Answers

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.

like image 56
Alex Avatar answered Sep 18 '22 11:09

Alex