Editar

Partilhar via


MetadataExchangeClient.GetMetadata Method

Definition

Returns a MetadataSet.

Overloads

GetMetadata(Uri, MetadataExchangeClientMode)

Returns a MetadataSet from the specified address using the specified download mode.

GetMetadata(EndpointAddress, Uri)

Returns a MetadataSet from the specified address and on the specified route.

GetMetadata(EndpointAddress)

Returns a MetadataSet from the specified address.

GetMetadata()

Returns a MetadataSet.

GetMetadata(Uri, MetadataExchangeClientMode)

Returns a MetadataSet from the specified address using the specified download mode.

public:
 System::ServiceModel::Description::MetadataSet ^ GetMetadata(Uri ^ address, System::ServiceModel::Description::MetadataExchangeClientMode mode);
public System.ServiceModel.Description.MetadataSet GetMetadata (Uri address, System.ServiceModel.Description.MetadataExchangeClientMode mode);
member this.GetMetadata : Uri * System.ServiceModel.Description.MetadataExchangeClientMode -> System.ServiceModel.Description.MetadataSet
Public Function GetMetadata (address As Uri, mode As MetadataExchangeClientMode) As MetadataSet

Parameters

address
Uri

The address from which to download the metadata.

mode
MetadataExchangeClientMode

The download mechanism to use.

Returns

The metadata that is downloaded.

Remarks

Use this method to specify the address and whether to use HTTP GET or WS-Transfer Get to download the metadata.

Applies to

GetMetadata(EndpointAddress, Uri)

Returns a MetadataSet from the specified address and on the specified route.

public:
 System::ServiceModel::Description::MetadataSet ^ GetMetadata(System::ServiceModel::EndpointAddress ^ address, Uri ^ via);
public System.ServiceModel.Description.MetadataSet GetMetadata (System.ServiceModel.EndpointAddress address, Uri via);
member this.GetMetadata : System.ServiceModel.EndpointAddress * Uri -> System.ServiceModel.Description.MetadataSet
Public Function GetMetadata (address As EndpointAddress, via As Uri) As MetadataSet

Parameters

address
EndpointAddress

The address from which to download the metadata.

via
Uri

The URI address that represents the route a message takes.

Returns

The metadata that is downloaded.

Applies to

GetMetadata(EndpointAddress)

Returns a MetadataSet from the specified address.

public:
 System::ServiceModel::Description::MetadataSet ^ GetMetadata(System::ServiceModel::EndpointAddress ^ address);
public System.ServiceModel.Description.MetadataSet GetMetadata (System.ServiceModel.EndpointAddress address);
member this.GetMetadata : System.ServiceModel.EndpointAddress -> System.ServiceModel.Description.MetadataSet
Public Function GetMetadata (address As EndpointAddress) As MetadataSet

Parameters

address
EndpointAddress

The address from which to download the metadata.

Returns

The metadata located at the address.

Applies to

GetMetadata()

Returns a MetadataSet.

public:
 System::ServiceModel::Description::MetadataSet ^ GetMetadata();
public System.ServiceModel.Description.MetadataSet GetMetadata ();
member this.GetMetadata : unit -> System.ServiceModel.Description.MetadataSet
Public Function GetMetadata () As MetadataSet

Returns

The MetadataSet that contains the downloaded metadata.

Examples

The following code example shows the use of MetadataExchangeClient to specify a download binding, resolve any contained references to metadata, and download the metadata.

// Get metadata documents.
Console.WriteLine("URI of the metadata documents retreived:");
MetadataExchangeClient metaTransfer
  = new MetadataExchangeClient(httpGetMetaAddress.Uri, MetadataExchangeClientMode.HttpGet);
metaTransfer.ResolveMetadataReferences = true;
MetadataSet otherDocs = metaTransfer.GetMetadata();
foreach (MetadataSection doc in otherDocs.MetadataSections)
    Console.WriteLine(doc.Dialect + " : " + doc.Identifier);

Applies to