WCF provides metadata endpoints that can help to automatically publish WSDL metadata for the hosted service. And this auto-generated WSDL metadata can be easily customized through the
IWsdlExportExtension interface so as to fit some special requirements in our service development.
In this recipe, we will use a web-hosted WCF service (with a metadata endpoint enabled) as an example to demonstrate how to customize the auto-generated WSDL metadata.
The first thing to do is create a custom type that implements the
IEndpointBehavior interfaces. The
IWsdlExportExtension interface ...