Wcf – Generating C#.net class from WSDL file

wcfwsdlxsd

I want to generate Web Service Classes (c#.net) from WSDL File. I want server side code not client side. Is there any tool or any other way available that can generate WCF service code from WSDL file?

Thanks in advance.

Best Answer

If you are using Visual Studio you can run SvcUtil.exe at the command prompt this will generate all of the C# objects based on the types defined in the WSDL, plus a service proxy that will expose the service as C# methods. It will also provide you with a sample config file for the WCF bindings. This is the same tool that Visual Studio uses for its Add Server Reference wizard, so either solution is acceptable.