Understanding the Proxy Class

The WCF service is exposed through the network via a WSDL. To consume objects and data exposed by the WSDL, the client needs a proxy class that is responsible for translating WSDL information into managed code that you can reuse. This is accomplished via a command-line tool named SvcUtil.exe that is part of the .NET Framework. Fortunately you do not need to run SvcUtil manually because Visual Studio will do the work for you. When you click OK from the Add Service Reference dialog, Visual Studio invokes SvcUtil and generates a proxy class. You notice, in Solution Explorer, a new folder named Service references. This folder contains all service references and, for the current example, it stores a new item named BookServiceReference ...

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.