« Interface to Business Process? | Main | WCF and Duplex Channels »
Last week, Ralph Squillace posted a walkthough of how to enable metadata publication (MEX, WSDL) for WCF services. I've been digging a little deeper into this and one of the questions I had was: How does the ServiceHost know where to find the IMetadataExchange implementation for a hosted service?
If you have looked into the WCF configuration, you'll notice that one enables metadata publication basically through two primary things:
However, your service class doesn't really implement IMetadataExchange; it is implemented by WCF itself. The way this works, as far as I'm able to tell, goes somewhat like this:
One pretty impressive thing about how all of this is accomplished is that most of this is not really magical; it just uses the standard extensibility points in WCF to do a fairly significant portion of the work. In my humble opinion, though, it is a shame that the first two steps I outlined above throw this out the window and introduce hight coupling between service hosting and metadata publication and even introduces a completely internal extensibility point [1].
This is particularly sad because this was a greate overall example of how to introduce arbitrary endpoints into a hosted service, which was something I was looking forward to as a way to expose other custom metadata endpoints to a service without having the service implementation itself be aware of this.
[1] it is always possible I'm just misinterpreting this, though I've been going over this for several days now.
Windows Communication Foundation, WCF, WCF Extensibility
About
Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...
email: tomas@winterdom.com msn: tomasr@passport.com
Syndicate
Ads
Links
Categories
Statistics
Blogroll
Post Archive
Other
Copyright © 2002-2008, Tomas Restrepo.
Powered by: newtelligence dasBlog 2.1.8139.823