15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1288 ❘ ChaPTer 43 windOws cOmmunicAtiOn fOundAtiOn<br />

figure 43-5<br />

WCf Client<br />

For the client, WCF is flexible again in what application type can be used. The client can be a simple<br />

console application as well. However, for reserving rooms, create a WPF application with controls, as shown<br />

in Figure 43-6.<br />

Because the service offers a MEX endpoint with the binding mexHttpBinding, <strong>and</strong> metadata access is enabled<br />

with the behavior configuration, you can add a service reference from Visual Studio. When you add a service<br />

reference, the dialog shown in Figure 43-7 pops up. When you click the Discover button, you can find services<br />

within the same solution.<br />

Enter the link to the service, <strong>and</strong> set the service reference name to RoomReservationService. The service<br />

reference name defines the namespace of the generated proxy class.<br />

figure 43-6<br />

figure 43-7<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!