System.ServiceModel 4.0.0.0 System.ServiceModel.Description.MetadataImporter

Use the class to import metadata as well as convert that information into various classes that represent contract and endpoint information.

The base class for , the class, defines methods that selectively import contract and endpoint information and properties that expose any import errors and accept type information relevant to the import and conversion process. The type uses the custom policy importers ( implementations) from its parent type to handle custom policy statements and its own custom WSDL importers ( implementations) to handle custom WSDL elements. For details, see Extending the Metadata System.

When importing policy from WSDL documents, the type will try up to 32 combinations of policy alternatives attached to the different WSDL policy subjects. If no combination imports cleanly, the first combination is used to construct a partial custom binding.

In addition to these methods and properties, also implements methods that support importing binding information and properties that provide access to any policy documents, WSDL documents, WSDL extensions, and XML schema documents. For information about extending to support custom WSDL elements, see .

Typically the class is used in a three-step process.

Create a object and pass a object to the constructor.

Call the appropriate Import method to retrieve the results.

Check the property to determine whether there are any import errors.

When importing WSDL port types, if the QName of the port type matches an entry in the dictionary then the port type is not imported and the known contract is used instead.

No values are returned from the properties until one of the import methods is called. Custom objects can either be loaded into the programmatically or using the client configuration <wsdlImporters> element.

Metadata that has been imported as service endpoints cannot be used to create a runtime or export metadata because the imported endpoints contain no managed type information. To use the metadata to create a client or service runtime or to generate metadata, you must first generate and compile code from the metadata and use that type information to create a new object using .

Imports Web Services Description Language (WSDL) 1.1 metadata with WS-Policy attachments.

- Constructor
  4.0.0.0
  To be added.

  Use the constructor to create a object from a set of metadata documents.

  Initializes a new instance of the class.

- Constructor
  4.0.0.0
  To be added.
  To be added.
  To be added.

  Use this constructor to control the metadata to be imported and the policy and WSDL importers to be used.

  If custom policy importers or custom WSDL importers are passed to this constructor any custom importers specified in application configuration files are not loaded. If you want to add a custom importer, you must reconstruct the importers collections prior to using this constructor. See the Example section.

  Creates a object from the specified metadata, custom policy importers, and custom WSDL importers.

- Method
  4.0.0.0
  System.Collections.ObjectModel.Collection<System.ServiceModel.Channels.Binding>

  Use the method to import all binding information from the metadata documents and return them as objects. Check the property to determine whether there are any import errors before using the returned objects.

  To import a specific WSDL binding, see the method.

  Returns a set of objects imported from the metadata documents.

  A set of objects imported from the metadata documents.

- Method
  4.0.0.0
  System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ContractDescription>

  Use the method to import all WSDL port type information from the metadata documents and return them as objects. It is recommended to check the property to determine whether there are any import errors before using the returned objects.

  To import only one port type, see the method.

  Returns a set of objects that represent port type information in the metadata documents.

  A set of objects that represent port type information in the metadata documents.

- Method
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpointCollection

  Use the method to import all endpoint information from the metadata documents and return them as a collection of objects. Check the property to determine whether there are any import errors before using the returned objects.

  To import only a specific WSDL port, see the method.

  Returns a that represents the endpoints in WSDL documents.

  A that represents the endpoints in WSDL documents.

- Method
  4.0.0.0
  System.ServiceModel.Channels.Binding `` To be added.

  Use the method to use a object to locate binding information in the metadata and return that binding information as a object. Check the property to determine whether there are any import errors before using the returned object.

  Returns a object that represents binding information from a set of metadata documents.

  A object that represents binding information from a set of metadata documents.

- Method
  4.0.0.0
  System.ServiceModel.Description.ContractDescription `` To be added.

  Use the method to use a object to locate port type information in the metadata and return that information as a object. Check the property to determine whether there are any import errors before using the returned object.

  Returns a object that represents metadata located by the specified port type information.

  A object that represents metadata located by the specified port type information.

- Method
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpoint `` To be added.

  Use the method to use a object to locate port type information in the metadata and return that information as a object. Check the property to determine whether there are any import errors before using the returned object.

  Returns a from a set of metadata documents that uses information from the specified object.

  A object that represents specific WSDL port information in the metadata document.

- Method
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpointCollection `` To be added.

  Check the property to determine whether there are any import errors before using the returned object.

  Returns a that represents all WSDL port types using the specified .

  A that represents all WSDL port types using the specified .

- Method
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpointCollection `` To be added.

  Check the property to determine whether there are any import errors before using the returned object.

  Returns a that represents all WSDL port types associated with the specified .

  A that represents all WSDL port types associated with the specified .

- Method
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpointCollection `` To be added.

  Check the property to determine whether there are any import errors before using the returned object.

  Returns a that represents all WSDL port types within the specified .

  A that represents all WSDL port types within the specified .

- Property
  4.0.0.0
  System.Web.Services.Description.ServiceDescriptionCollection To be added.

  The property is not populated until an import method is called.

  Gets a set of objects that describe the contract information in the metadata documents.

- Property
  4.0.0.0
  System.Collections.Generic.KeyedByTypeCollection<System.ServiceModel.Description.IWsdlImportExtension> To be added.

  Use the property to add or remove custom WSDL importers.

  Gets a set of objects used to import custom WSDL information.

- Property
  4.0.0.0
  System.Xml.Schema.XmlSchemaSet To be added.

  This property is not populated until one of the import methods is called.

  Gets a set of objects that describe types in the metadata.