The metadata is to describe how to interact with the service’s endpoints. We could generate Proxy class for the Client as well as it updates the .config files[App.config/Web.config] for the Client Application.
For example Svcutil.exe could automatically generated client code for accessing the service..
Trough Visual Studio 2008/2005 with WCF extension, we can “Add Service Reference” which does the entire necessary task for us.
For is purpose it is the following code added to the Service Code.
using System.ServiceModel.Description;
ServiceMetadataBehavior svcMetaBehav = new ServiceMetadataBehavior();
svcMetaBehav.HttpGetEnabled = true;
svcHost.Description.Behaviors.Add(svcMetaBehav);
The WSDL of this service looks like as following: