This documentation is archived and is not being maintained.

IMetadataExchange Interface

Exposes methods used to return metadata about a service.

Namespace:  System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

[ServiceContractAttribute(ConfigurationName = "IMetadataExchange", Name = "IMetadataExchange", 
	Namespace = "")]
public interface IMetadataExchange

The IMetadataExchange type exposes the following members.

Public methodBeginGetStarts an asynchronous retrieval of metadata.
Public methodEndGetConcludes the retrieval of metadata.
Public methodGetReturns the service metadata.

When programming services, it is useful to publish metadata about the service. For example, metadata can be a Web Services Description Language (WSDL) document that describes all of the methods and data types employed by a service. Returning metadata about an service allows consumers of a service to easily create clients for the service. For more information about metadata endpoints, see Metadata.

Services implemented using publish metadata by exposing one or more metadata endpoints. Metadata endpoints in have an address, a binding and a contract like any other endpoint. The MetadataReference interface specifies the service contract implemented by all metadata endpoints in .

There is no need to implement the MetadataReference contract in your service implementation. Instead, add the ServiceMetadataBehavior to the service description.

Or, when using configuration, set the contract attribute of the endpoint element to IMetadataExchange. For an example, see How to: Publish Metadata for a Service Using a Configuration File.

For details on publishing metadata in see Publishing Metadata.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.