Updated WCF RSS Toolkit for Visual Studio 2008 and .NET 3.5
Now that I'm happily living in the exciting, fast paced world of Greater London you'd think my weekends would be spent enjoying the active nightlife or soaking in the culture and history all around me. But you'd be wrong. I'm a nerd and so I spent my weekend in nerd bliss, a.k.a. getting reacquainted with my old friend WCF. Sorry ladies, I'm taken.
I had reason to look at building a RSS service with WCF and ran across the WCF RSS Toolkit. This is a very cool sample app written I believe by Clemens Vasters which allows developers to build services that expose endpoints encoded for RSS or ATOM. The implementation is pretty slick in that it checks the QueryString for operations and routes the calls accordingly. It also formats the feeds dynamically to RSS or ATOM using XSLT transforms before unwrapping the message from SOAP using a custom POX Encoder.
While this is all extreme coolness, and I take absolutely no credit for any of it, it did have one major problem. It was built quite some time ago and uses the CTP version of WCF. I assumed that somebody must have a more up-to-date version or a better way to generically build an RSS/ATOM service but after looking around for several hours I couldn't find much. And so with a weekend to kill and my nerd gene complelling me I dug into the code and started migrating it to Visual Studio 2008 and .NET 3.5.
There were several small changes that needed to be made to update some class names that were different between RTM and the CTP version and also a few abstract method implementation changes. A more significant change was that the POX Encoder functionality wasn't really necessary anymore since WCF will send POX messages if you specify a MessageVersion of type "None". After making these changes I loaded up the samples and confirmed that they all worked.
So here then is the updated version. I've posted an item on WCF.NetFX3.com as well. If there's anything I missed please let me know. Also, if there is a newer/better way to implement RSS/ATOM services in WCF feel free to comment to this post as my search wasn't necessarily exhaustive.