Customizing auto-generated service metadata
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.
How to do it...
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.
- Create a class that implements both the
IWsdlExportExtension
andIEndpointBehavior
interfaces.The first thing to do is create a custom type that implements the
IWsdlExportExtension
andIEndpointBehavior
interfaces. TheIWsdlExportExtension
interface ...
Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.