Uredi

Deli z drugimi prek


MtomMessageEncodingBindingElement.IPolicyExportExtension.ExportPolicy Method

Definition

Inserts a policy assertion into the WSDL, when it is generated, which indicates that an MTOM encoding is being used.

 virtual void System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy(System::ServiceModel::Description::MetadataExporter ^ exporter, System::ServiceModel::Description::PolicyConversionContext ^ policyContext) = System::ServiceModel::Description::IPolicyExportExtension::ExportPolicy;
void IPolicyExportExtension.ExportPolicy (System.ServiceModel.Description.MetadataExporter exporter, System.ServiceModel.Description.PolicyConversionContext policyContext);
abstract member System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy : System.ServiceModel.Description.MetadataExporter * System.ServiceModel.Description.PolicyConversionContext -> unit
override this.System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy : System.ServiceModel.Description.MetadataExporter * System.ServiceModel.Description.PolicyConversionContext -> unit
Sub ExportPolicy (exporter As MetadataExporter, policyContext As PolicyConversionContext) Implements IPolicyExportExtension.ExportPolicy

Parameters

exporter
MetadataExporter

The WsdlExporter that exports the contract information.

policyContext
PolicyConversionContext

A WsdlContractConversionContext object that provides mappings from exported WSDL elements to the contract description.

Implements

Exceptions

policyContext is null.

Remarks

This policy assertion indicates that MTOM optimization can be used at this endpoint. It implies that messages either in the text or MTOM format must be accepted. On the client, this policy assertion is parsed and the ability to accept MTOM-encoded messages is enabled. The policy assertion is as follows.

<wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" />  

Applies to