O'Reilly logo

Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications by Steven Cheng

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using ChannelFactory to consume a WCF service

When consuming a WCF service, it is common to generate a strong-typed client proxy class (either through Visual Studio's Add Service Reference context menu item or .NET SDK's Svcutil.exe tool) for invoking service operation. However, there are many cases in which we will need to get rid of this kind of auto-generated service proxy class. For example, we may need to directly reuse the existing types (including the ServiceContract type and custom data types) used in the service definition, or we might just need a lightweight component to invoke a service operation. For such scenarios, we can use the ChannelFactory class to directly communicate with the target WCF service endpoint.

How to do it...

Here ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required