WsdlExporter Class
Converts service, contract, and endpoint information into metadata documents.
System.ServiceModel.Description::MetadataExporter
System.ServiceModel.Description::WsdlExporter
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The WsdlExporter type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Errors | Gets a collection of errors that occurred during metadata export. (Inherited from MetadataExporter.) |
![]() | GeneratedWsdlDocuments | Gets a collection of ServiceDescription objects after calling one of the export methods. |
![]() | GeneratedXmlSchemas | Gets a set of XmlSchema objects after calling one of the export methods. |
![]() | PolicyVersion | Specifies the version of WS-Policy specification being used. (Inherited from MetadataExporter.) |
![]() | State | Gets a dictionary of objects used in the export of metadata. (Inherited from MetadataExporter.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | ExportContract | Exports metadata that describes only the contract information from the specified contract description. (Overrides MetadataExporter::ExportContract(ContractDescription).) |
![]() | ExportEndpoint | Generates metadata about the specified endpoint. (Overrides MetadataExporter::ExportEndpoint(ServiceEndpoint).) |
![]() | ExportEndpoints | Generates metadata about a group of endpoints from a specified service. |
![]() | ExportPolicy | Converts policy assertions into a System.ServiceModel.Description::PolicyConversionContext object. (Inherited from MetadataExporter.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetGeneratedMetadata | Returns an enumerable collection of generated MetadataSection objects. (Overrides MetadataExporter::GetGeneratedMetadata().) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Use the WsdlExporter class to transform ContractDescription or ServiceEndpoint objects into metadata represented by MetadataSection objects.
The WsdlExporter is used in a three-step process.
Call the ExportContract, ExportEndpoint, or ExportEndpoints method, passing the appropriate parameters.
Determine whether there are any export errors by checking the base Errors property.
If there are no errors, use the GetGeneratedMetadata to get a collection of MetadataSection objects or get more specific versions of the metadata using the GeneratedWsdlDocuments or GeneratedXmlSchemas properties.
You can support exporting custom WSDL extensions by implementing the IWsdlExportExtension interface and custom policy assertions by implementing the IPolicyExportExtension interface. For details, see the documentation for those interfaces.
Note |
|---|
The WsdlExporter can only be used to export metadata from ContractDescription instances that contain Common Language Runtime (CLR) type information, such as a ContractDescription instance created using the ContractDescription.GetContract method or created as part of the ServiceDescription for a ServiceHost instance. You cannot use the WsdlExporter to export metadata from ContractDescription instances imported from service metadata or constructed without type information. |
The following code example shows how to use the ExportEndpoint method to generate a set of MetadataSection objects from the endpoints in a collection of ServiceEndpoint objects called myServiceEndpoints.
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.
