Showing posts with label introduction to windows communication foundation. Show all posts
Showing posts with label introduction to windows communication foundation. Show all posts

Monday, September 16, 2013

Windows Communication Foundation - Different ways of generating classes from wsdl


1)      Command prompt using svcutil.exe
Example1: Generating from wsdl
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>svcutil <pathtowsdl>\Sample.wsdl /out:<outputpath>\Sample.cs /config:<outputpath>\Sample.config /targetClientVersion:Version30 
Example2: Generating from xsd
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>svcutil svcutil <pathtowsdl>\Sample.xsd /out:<outputpath>\Sample.cs

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6962084931129525"
     crossorigin="anonymous"></script>

2)      Adding a service reference to the solution in Visual Studio.

3)      From VisualStudio-> Tools -> External Tools . (Configured svcutil.exe to the external tools. )
Command: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\SvcUtil.exe
Arguments: /language:C# /out:IEventNotification.cs $(ItemPath)