Search code examples
wcfvisual-studio-2010restwcf-rest

Consuming WCF Rest services with visual studio 2010?


I am used to using soap services where you add a service reference and it creates strong types classes (return types) of each method..

Of course REST doesn't work like this

How do i consume a WCF REST Service?

Is there no way to use strongly typed classes for the return types?

I am using Visual Studio 2010 specifically

Any ideas or thoughts really appreciated

Thanks in advance


Solution

  • See Is there a WCF Rest C# Client Generation Tool?. If you own both the service and the client, you can reuse the contracts and instantiate an client channel with WebChannelFactory.