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

Creating a typed service client

WCF services can be consumed by a client through various means. If our client application is also built upon .NET Framework 3.x or above, the most common and convenient way of consuming the WCF service is by using a typed service proxy class. This recipe will show you how to create a typed service proxy through WCF service metadata.

How to do it...

We will go through the typed service proxy generation steps via a simple WCF service that is hosted at the address http://localhost:29671/service1.svc.

Following are the detailed steps:

  1. Get the WSDL metadata of the targeting service.

    For our sample service, we can directly get the service metadata at the SVC endpoint file (from the previous address).

  2. Locate the service metadata ...

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