wsdl ans Svcutil : Add Web Service Reference in VS 2010/2012

Hi all,

This is going to be a small post and I am going to share one problem that I faced few days back.

I received a service a web service URL that was written in some different technology other than .NET and I added the the reference of it using add service reference but when I compiled that application,I received many build errors.

Then I just realized that I am using Add service reference option and it uses svcutil.exe to create the proxy. As we know this utility was introduced with WCF and works well for WCF  services.

I recalled the way the way we used to write the WCF services like writing different contracts like service contract, message contract and message contract and the way we write in asmx web services is totally different. The assemblies are different as well. So I tried to find where I can get the option to Add Web Reference ( Although I had the option to use the command line utility). I found it here

Right Click on the project -> add service reference

first

Click advanced as above

second

Now Click on Add Web Service Reference.

third

You can remember the above screen. We used it a lot while working with VS2005. The above one uses the wsdl.exe to generate the proxy from the wsdl.

After using this utility my application started working. Svcutil.exe is a sophisticated tool (provides many options and other features as well) and it’s generates the proxy in different way to create it. For details refer the links below

For wsdl.exe

http://msdn.microsoft.com/en-us/library/7h3ystb6%28VS.71%29.aspx

and for Svcutil.exe

http://msdn.microsoft.com/en-us/library/aa347733.aspx

Hope that helps.

Happy Coding,
Brij

One thought on “wsdl ans Svcutil : Add Web Service Reference in VS 2010/2012

Leave a comment