<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>NathanA's Sometimes XAML and Sometimes Web Services Blog</title><link>http://blogs.msdn.com/nathana/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>TestApi v0.3 released</title><link>http://blogs.msdn.com/nathana/archive/2009/07/27/testapi-v0-3-released.aspx</link><pubDate>Mon, 27 Jul 2009 19:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9850173</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/9850173.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=9850173</wfw:commentRss><description>&lt;P&gt;TestApi is a collection of test and utility API's written to make testing WPF, WinForms, .NET, and Win32 applications easy.&amp;nbsp; I made some contributions to last week's release (combinatorial variation generation).&amp;nbsp; Also new is a fault injection engine.&amp;nbsp; Previous features have included:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Command line parsing&lt;/LI&gt;
&lt;LI&gt;Visual verification&lt;/LI&gt;
&lt;LI&gt;Application control&lt;/LI&gt;
&lt;LI&gt;Several WPF utilities&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;You can check it out here:&amp;nbsp; &lt;A href="http://testapi.codeplex.com/"&gt;http://testapi.codeplex.com/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9850173" width="1" height="1"&gt;</description></item><item><title>XAMLFest</title><link>http://blogs.msdn.com/nathana/archive/2009/05/22/xamlfest.aspx</link><pubDate>Fri, 22 May 2009 18:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9635334</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/9635334.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=9635334</wfw:commentRss><description>If you're interested in what XAML can do for you today and what tooling is available, check out &lt;A href="http://xamlfestonline.com/" mce_href="http://xamlfestonline.com"&gt;XAMLFest&lt;/A&gt;.&amp;nbsp; There's a whole series of web seminars on WPF, Silverlight, Blend, and Visual Studio.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9635334" width="1" height="1"&gt;</description></item><item><title>New XAML features in .NET 4.0 Beta 1</title><link>http://blogs.msdn.com/nathana/archive/2009/05/22/new-xaml-features-in-net-4-0-beta-1.aspx</link><pubDate>Fri, 22 May 2009 17:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9635325</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/9635325.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=9635325</wfw:commentRss><description>&lt;P&gt;There's a whole new XAML stack in the recently released beta 1 (download &lt;A href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx" mce_href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx"&gt;here&lt;/A&gt;) with a bunch of exciting new features making XAML even more expressive.&amp;nbsp; You can check out &lt;A href="http://blogs.windowsclient.net/rob_relyea/archive/2009/05/19/xaml2009-and-system-xaml-dll-preview-in-net-fx-4-beta1.aspx" mce_href="http://blogs.windowsclient.net/rob_relyea/archive/2009/05/19/xaml2009-and-system-xaml-dll-preview-in-net-fx-4-beta1.aspx"&gt;Rob's blog&lt;/A&gt;&amp;nbsp;and &lt;A href="http://channel9.msdn.com/shows/Continuum/XAMLinNET4/" mce_href="http://channel9.msdn.com/shows/Continuum/XAMLinNET4/"&gt;Channel 9&lt;/A&gt;&amp;nbsp;for an overview.&amp;nbsp; I thought I'd discuss some new features for designing new types (Activities, Services, etc) in XAML.&amp;nbsp; Sorry, this isn't supported for WPF as of now.&lt;/P&gt;
&lt;P&gt;When you fire up Visual Studio 2010 and create a new WCF or WF project, you'll see there's now a XAML file that defines your workflow or service.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For WCF, the service is actually "loose" XAML.&amp;nbsp; It doesn't create a new type and will simply be instantiated by your service host with the equivalent of XamlServices.Load.&lt;/P&gt;
&lt;P&gt;For WF, the workflow is defined as a&amp;nbsp;new type that will be compiled as part of your project, if you look at the XAML in the new project there'll be something like this:&lt;/P&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;p:Activity&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;x:Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;WorkflowConsoleApplication1.Sequence1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; ...&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Nothing new here except x:Class is applied to a WF type instead of WPF.&amp;nbsp; Now lets add some arguments to the Activity:&lt;/P&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;p:Activity&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;x:Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;WorkflowConsoleApplication1.Sequence1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; ...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&amp;gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;x:Members&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;x:Property&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;Name&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;Input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;Type&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;p:InArgument(x:String)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; /&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;x:Property&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;Name&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;Output&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;Type&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;p:OutArgument(x:String)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; /&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;&lt;FONT color=#a31515 size=2 face=Consolas&gt;x:Property&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;Name&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;Temp&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;&lt;FONT color=#ff0000 size=2 face=Consolas&gt;Type&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;x:String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt; /&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;&lt;FONT color=#0000ff size=2 face=Consolas&gt;...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Here's where we see some of the new XAML features.&amp;nbsp; x:Members defines a collection of new members to add to this type.&amp;nbsp; x:Property adds a property.&amp;nbsp; Name and type are specified here, visibility (public, protected, etc)&amp;nbsp;can be specified with the Modifer property.&amp;nbsp; We can also see the new generics support as p:InArgument(x:String) refers to the type InArgument&amp;lt;string&amp;gt;.&amp;nbsp; All of the new language features mentioned in Rob's post can be used in this XAML.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9635325" width="1" height="1"&gt;</description></item><item><title>Lots of new WCF REST resources available</title><link>http://blogs.msdn.com/nathana/archive/2008/10/30/lots-of-new-wcf-rest-resources-available.aspx</link><pubDate>Thu, 30 Oct 2008 23:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9025286</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/9025286.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=9025286</wfw:commentRss><description>&lt;P&gt;A new developer center just for WCF REST is now live at MSDN:&amp;nbsp; &lt;A href="http://msdn.microsoft.com/wcf/rest"&gt;http://msdn.microsoft.com/wcf/rest&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Plus the WCF REST Starter kit with oodles of goodies is available at Codeplex: &lt;A href="http://www.codeplex.com/aspnet/Wiki/View.aspx?title=WCF%20REST"&gt;http://www.codeplex.com/aspnet/Wiki/View.aspx?title=WCF%20REST&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;There's also a forum to discuss the starter kit:&amp;nbsp; &lt;A href="http://forums.asp.net/1180.aspx"&gt;http://forums.asp.net/1180.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9025286" width="1" height="1"&gt;</description></item><item><title>PDC is coming</title><link>http://blogs.msdn.com/nathana/archive/2008/10/07/pdc-is-coming.aspx</link><pubDate>Tue, 07 Oct 2008 23:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8987302</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/8987302.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=8987302</wfw:commentRss><description>&lt;P&gt;Uncloaking after a long absence, here's some of what is new and exciting for the next release of WCF and WF:&amp;nbsp; everything can be done in XAML.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.windowsclient.net/rob_relyea/archive/2008/09/30/pdc08-xaml-talk.aspx"&gt;http://blogs.windowsclient.net/rob_relyea/archive/2008/09/30/pdc08-xaml-talk.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://channel9.msdn.com/pdc2008/TL36/"&gt;http://channel9.msdn.com/pdc2008/TL36/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8987302" width="1" height="1"&gt;</description></item><item><title>WCF Web Programming Help Page</title><link>http://blogs.msdn.com/nathana/archive/2007/09/17/wcf-web-programming-help-page.aspx</link><pubDate>Mon, 17 Sep 2007 19:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4959187</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/4959187.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=4959187</wfw:commentRss><description>&lt;P&gt;When developing a WCF service using the new web programming features, it's natural to make sure all the basics are taken care of by entering the service address into a browser.&amp;nbsp;&amp;nbsp;When the service is running correctly, this page is returned:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.msdn.com/photos/nathana/images/4958742/original.aspx" border=0 mce_src="http://blogs.msdn.com/photos/nathana/images/4958742/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;This indicates the service is running but little else.&amp;nbsp; There's lots of other information that would be useful to include, maybe something like this (I'm not an html wizard so this could be greatly improved:)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;IMG src="http://blogs.msdn.com/photos/nathana/images/4959488/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;This is made possible by including an OperationContract like this in the ServiceContract:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;WebInvoke&lt;/SPAN&gt;(UriTemplate = &lt;SPAN style="COLOR: #a31515"&gt;"*"&lt;/SPAN&gt;, Method = &lt;SPAN style="COLOR: #a31515"&gt;"*"&lt;/SPAN&gt;)]&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;OperationContract&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;Message&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt; Help(&lt;SPAN style="COLOR: #2b91af"&gt;Message&lt;/SPAN&gt; m);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The method can be named anything and UriTemplate and Method can be tweaked to serve custom help for only certain situations.&amp;nbsp; As&amp;nbsp;shown, any message routed to the service that doesn't match another operation contract will call Help.&amp;nbsp; To implement this method I created two classes, WebHttpHelpPageGenerator and WebHttpHelpPageMessage.&amp;nbsp; WebHttpHelpPageGenerator handles collecting the information to display and WebHttpHelpPageMessage derives from Message and handles formatting that information into html.&amp;nbsp; These are used to implement Help like this:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: #2b91af"&gt;Message&lt;/SPAN&gt; Help(&lt;SPAN style="COLOR: #2b91af"&gt;Message&lt;/SPAN&gt; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WebHttpHelpPageGenerator&lt;/SPAN&gt;.GenerateHelpPage();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;WebHttpHelpPageGenerator.GenerateHelpPage is able to accomplish its task by using OperationContext.Current.EndpointDispatch.ContractName and OperationContext.Current.Host.Description.Endpoints to find the current ServiceEndpoint which contains a list of Operations and the CLR type of the contract:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ServiceEndpointCollection&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; endpoints = &lt;SPAN style="COLOR: #2b91af"&gt;OperationContext&lt;/SPAN&gt;.Current.Host.Description.Endpoints;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;OperationDescriptionCollection&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; operations = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; contract = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;ServiceEndpoint&lt;/SPAN&gt; endpoint &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; endpoints)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (endpoint.Contract.Name == &lt;SPAN style="COLOR: #2b91af"&gt;OperationContext&lt;/SPAN&gt;.Current.EndpointDispatcher.ContractName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;contract = endpoint.Contract.ContractType;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;operations = endpoint.Contract.Operations;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;break&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;So with that list and a little reflection all the necessary information can be exctracted:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;message.TitleTextString = contract.Name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;OperationDescription&lt;/SPAN&gt; operation &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; operations)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;WebGetAttribute&lt;/SPAN&gt; get = operation.Behaviors.Find&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;WebGetAttribute&lt;/SPAN&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;WebInvokeAttribute&lt;/SPAN&gt; invoke = operation.Behaviors.Find&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;WebInvokeAttribute&lt;/SPAN&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (get == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; &amp;amp;&amp;amp; invoke == &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;) &lt;SPAN style="COLOR: blue"&gt;continue&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;MethodInfo&lt;/SPAN&gt; method = contract.GetMethod(operation.Name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;OperationInfo&lt;/SPAN&gt; info = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;OperationInfo&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;OperationName = operation.Name,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Method = get != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; ? &lt;SPAN style="COLOR: #a31515"&gt;"GET"&lt;/SPAN&gt; : invoke.Method,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;BodyStyle = get != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; ? get.BodyStyle.ToString() : invoke.BodyStyle.ToString(),&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;UriTemplate = get != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; ? get.UriTemplate : invoke.UriTemplate,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ReturnType = method.ReturnType.ToString(),&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Parameters = GetFormattedParameters(method.GetParameters()),&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;RequestFormat = get != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; ? get.RequestFormat.ToString() : invoke.ResponseFormat.ToString(),&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ResponseFormat = get != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt; ? get.ResponseFormat.ToString() : invoke.ResponseFormat.ToString()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;info.OperationName = operation.Name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;message.Operations.Add(info);&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;OperationInfo is just a helper class to encapsulate all the data collected.&amp;nbsp; Finally the new WebOperationContext class is used to set the content type to text/html:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;WebOperationContext&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;.Current.OutgoingResponse.ContentType = &lt;SPAN style="COLOR: #a31515"&gt;"text/html"&lt;/SPAN&gt;;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;This builds a general purpose framework that can be called from any service using the new web programming features, though I'm sure I missed plenty of corner cases (like async programming.)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4959187" width="1" height="1"&gt;</description></item><item><title>WCF Web Programming or: How I Learned to Stop Worrying and Love Uri Templates</title><link>http://blogs.msdn.com/nathana/archive/2007/09/13/wcf-web-programming-or-how-i-learned-to-stop-worrying-and-love-uri-templates.aspx</link><pubDate>Fri, 14 Sep 2007 00:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4902877</guid><dc:creator>NathanA</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/nathana/comments/4902877.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=4902877</wfw:commentRss><description>&lt;P&gt;Using WCF in web programming scenarios is much simplified in Orcas beta 2 (see &lt;A href="http://hyperthink.net/blog/CategoryView,category,indigo.aspx"&gt;http://hyperthink.net/blog/CategoryView,category,indigo.aspx&lt;/A&gt;&amp;nbsp;and scroll down for more discussions).&amp;nbsp; Maybe you want to write an app that searches Flickr, how can you use WCF?&amp;nbsp; Well, define an interface that exposes the functionality you need:&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;ServiceContract&lt;/SPAN&gt;]&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;interface&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: #2b91af"&gt;IFlickrSearch&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;WebGet&lt;/SPAN&gt;(UriTemplate=&lt;SPAN style="COLOR: #a31515"&gt;"services/rest/?method=flickr.photos.search&amp;amp;api_key={appId}&amp;amp;tags={searchTerms}&amp;amp;extras={extras}&amp;amp;per_page={perPage}"&lt;/SPAN&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;BodyStyle=&lt;SPAN style="COLOR: #2b91af"&gt;WebMessageBodyStyle&lt;/SPAN&gt;.Bare)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;OperationContract&lt;/SPAN&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;XmlSerializerFormat&lt;/SPAN&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;rsp&lt;/SPAN&gt; Search(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; appId, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; searchTerms, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; extras, &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; perPage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;The &lt;A class="" href="http://www.flickr.com/services/api/" mce_href="http://www.flickr.com/services/api/"&gt;Flickr API&lt;/A&gt; is very rich, so this is just the tip of the iceberg, but just this little bit of code accomplishes a lot.&amp;nbsp; We have all the WCF v1 attributes (ServiceContract, OperationContract) and some new stuff.&amp;nbsp; WebGet says the request will be a GET and UriTemplate describes how the parameters will be turned into the uri for the request.&amp;nbsp; This provides a great deal of flexibility in defining your interface to the service you're programming against.&amp;nbsp; The Bare BodyStyle specifies to the serializer there won't be wrapper element named SearchResponse on the response.&amp;nbsp; XmlSerializerFormat is another holdover specifying the XmlSerializer, and rsp is a&amp;nbsp;type generated with xsd.exe to deserialize the response.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Now we're ready to call Flickr:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;WebChannelFactory&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;IFlickrSearch&lt;/SPAN&gt;&amp;gt; factory =&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;WebChannelFactory&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;IFlickrSearch&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;Uri&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"http://api.flickr.com"&lt;/SPAN&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IFlickrSearch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; channel = factory.CreateChannel();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;rsp&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt; flickrRsp = channel.Search(AppId, searchTerms, Extras, perPage);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;And that's it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Maybe you're saying XmlSerializer is way too 20th century and you'd like use something more 21st, like XLinq.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;ServiceContract&lt;/SPAN&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;interface&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: #2b91af"&gt;IFlickrSearch&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;WebGet&lt;/SPAN&gt;(UriTemplate = &lt;SPAN style="COLOR: #a31515"&gt;"services/rest/?method=flickr.photos.search&amp;amp;api_key={appId}&amp;amp;tags={searchTerms}&amp;amp;extras={extras}&amp;amp;per_page={perPage}"&lt;/SPAN&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;BodyStyle = &lt;SPAN style="COLOR: #2b91af"&gt;WebMessageBodyStyle&lt;/SPAN&gt;.Bare)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;OperationContract&lt;/SPAN&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;XElement&lt;/SPAN&gt; Search(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; appId, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; searchTerms, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; extras, &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; perPage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;We've just taken out the XmlSerializerFormat attribute and replaced the rsp type with XElement.&amp;nbsp; Now we can use Linq and turn the Flickr search into a SyndicationFeed (another new WCF Orcas feature):&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;SyndicationFeed&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; feed = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;SyndicationFeed&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;feed.Title = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;TextSyndicationContent&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"Flickr search"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;feed.Items =&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;from&lt;/SPAN&gt; photos &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; flickrXml.Elements(&lt;SPAN style="COLOR: #a31515"&gt;"photos"&lt;/SPAN&gt;).Elements(&lt;SPAN style="COLOR: #a31515"&gt;"photo"&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;select&lt;/SPAN&gt; SyndicationItemFromXElement(photos);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Just add this to a service and now you have a Flickr search you can subscribe to in the feed aggregator of your choice.&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4902877" width="1" height="1"&gt;</description></item><item><title>Getting started with LINQ</title><link>http://blogs.msdn.com/nathana/archive/2007/09/12/getting-started-with-linq.aspx</link><pubDate>Wed, 12 Sep 2007 19:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4881713</guid><dc:creator>NathanA</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/nathana/comments/4881713.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=4881713</wfw:commentRss><description>&lt;P&gt;Here's a great site with a bunch of&amp;nbsp;samples if you've said to yourself "I'm pretty sure&amp;nbsp;I can do this&amp;nbsp;with LINQ, but I'm not quite sure how."&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx" mce_href="http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx"&gt;101 LINQ Samples&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4881713" width="1" height="1"&gt;</description></item><item><title>Custom SOAP Headers: WCF and ASMX</title><link>http://blogs.msdn.com/nathana/archive/2007/05/29/custom-soap-headers-wcf-and-asmx.aspx</link><pubDate>Tue, 29 May 2007 23:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2974915</guid><dc:creator>NathanA</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/nathana/comments/2974915.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=2974915</wfw:commentRss><description>&lt;P&gt;First the good news, WCF clients should just work with&amp;nbsp;ASMX services that use custom&amp;nbsp;SOAP headers.&lt;/P&gt;
&lt;P&gt;Now the not so good news, ASMX clients will work with WCF services that use headers, but the object model is pretty funky.&amp;nbsp; Say you want to do something really crazy like have a header of type string.&amp;nbsp; The ASMX client will represent that header with a class that looks like this:&lt;/P&gt;
&lt;P&gt;[System.Xml.Serialization.XmlTypeAttribute(Namespace="&lt;A href="http://www.w3.org/2001/XMLSchema" mce_href="http://www.w3.org/2001/XMLSchema"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;")]&lt;BR&gt;[System.Xml.Serialization.XmlRootAttribute("StringHeader", Namespace="&lt;A href="http://xwsinterop/soapwsdl/headers" mce_href="http://xwsinterop/soapwsdl/headers"&gt;http://xwsinterop/soapwsdl/headers&lt;/A&gt;", IsNullable=true)]&lt;BR&gt;public partial class @string : System.Web.Services.Protocols.SoapHeader {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private string[] textField;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Xml.Serialization.XmlTextAttribute()]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string[] Text {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this.textField;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.textField = value;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;To use this class, assign a new string array of length 1 to Text and then assign the value of the header to that element and it will work as expected.&amp;nbsp; These sorts of classes will be generated by ASMX for any simple type, the workaround is to use wrapper classes around the headers on the WCF side.&amp;nbsp; This will result in a somewhat clunky OM, but it will make sense.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2974915" width="1" height="1"&gt;</description></item><item><title>Custom SOAP Headers:  WCF and Java</title><link>http://blogs.msdn.com/nathana/archive/2007/05/29/custom-soap-headers-wcf-and-java.aspx</link><pubDate>Tue, 29 May 2007 23:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2974760</guid><dc:creator>NathanA</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/nathana/comments/2974760.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=2974760</wfw:commentRss><description>&lt;P&gt;First the good news, WCF clients should just work with Java services that use custom&amp;nbsp;SOAP headers.&lt;/P&gt;
&lt;P&gt;Now the not so good news, Java proxies generated from the default WCF WSDL won't include the SOAP headers in the object model.&amp;nbsp; The root problem is most Java platforms represent headers in WSDL differently than WCF.&amp;nbsp; In WCF, the body and the headers are defined in different WSDL message elements:&lt;/P&gt;
&lt;P&gt;&amp;lt;wsdl:message name="OneHeaderIntRequest"&amp;gt;&lt;BR&gt;&amp;lt;wsdl:part name="stringBody" element="tns:stringBody" /&amp;gt; &lt;BR&gt;&amp;lt;/wsdl:message&amp;gt;&lt;BR&gt;&amp;lt;wsdl:message name="OneHeaderIntRequest_Headers"&amp;gt;&lt;BR&gt;&amp;lt;wsdl:part name="IntHeader" element="tns:IntHeader" /&amp;gt; &lt;BR&gt;&amp;lt;/wsdl:message&amp;gt;&lt;/P&gt;
&lt;P&gt;but for most Java platforms, only one message with multiple parts is defined:&lt;/P&gt;
&lt;P&gt;&amp;lt;message name="OneHeaderIntRequest"&amp;gt;&lt;BR&gt;&amp;lt;part element="s0:stringBody" name="parameters" /&amp;gt; &lt;BR&gt;&amp;lt;part element="s0:IntHeader" name="IntHeader" /&amp;gt; &lt;BR&gt;&amp;lt;/message&amp;gt;&lt;/P&gt;
&lt;P&gt;The workaround is to modify the WCF WSDL to mirror the Java-style WSDL (eliminate the OneHeaderIntRequest_Headers message and move the IntHeader part into the OneHeaderIntRequest message in this case).&amp;nbsp; Unfortunately this is a manual process.&amp;nbsp; Now to serve this wsdl requires setting the ExternalMetadataLocation property on the ServiceMetadataBehavior either &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.externalmetadatalocation.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.externalmetadatalocation.aspx"&gt;in a service host&lt;/A&gt; or &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms731317.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms731317.aspx"&gt;in config&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2974760" width="1" height="1"&gt;</description></item><item><title>How do I get a DateTime from a UNIX timestamp?</title><link>http://blogs.msdn.com/nathana/archive/2007/05/13/how-do-i-get-a-datetime-from-a-unix-timestamp.aspx</link><pubDate>Mon, 14 May 2007 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2610297</guid><dc:creator>NathanA</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/nathana/comments/2610297.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=2610297</wfw:commentRss><description>&lt;P&gt;Often when consuming data from a web site, it will represent time with a UNIX timestamp.&amp;nbsp; This is the number of seconds since January 1, 1970.&amp;nbsp; It would be nice to turn this into a System.DateTime, but how?&lt;FONT color=#008080 size=2&gt;&lt;/P&gt;
&lt;P&gt;DateTime&lt;/FONT&gt;&lt;FONT size=2&gt; FromUnixTime(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Int64&lt;/FONT&gt;&lt;FONT size=2&gt; unixTime)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DateTime&lt;/FONT&gt;&lt;FONT size=2&gt; time = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DateTime&lt;/FONT&gt;&lt;FONT size=2&gt;(unixTime * 10000000);&lt;/P&gt;
&lt;P&gt;time = time.AddYears(1969);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; time;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;The DateTime constructor takes the number of 100 nanosecond ticks since January 1, 0001, so multiplying by 10000000 translates seconds into 100 nanosecond intervals.&amp;nbsp; But the Unix era begins in 1970 and DateTime in 1, so to translate that we add 1969 years.&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2610297" width="1" height="1"&gt;</description></item><item><title>Coming soon...</title><link>http://blogs.msdn.com/nathana/archive/2007/05/13/coming-soon.aspx</link><pubDate>Mon, 14 May 2007 01:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2609864</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/2609864.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=2609864</wfw:commentRss><description>I have done much posting in more or less forever, but I have some new stuff on deck.&amp;nbsp; In the meantime, check out the recent posts at&amp;nbsp;&lt;A class="" href="http://hyperthink.net/blog/" mce_href="http://hyperthink.net/blog/"&gt;Steve Maine's&lt;/A&gt; blog for some of the stuff I've been working on.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2609864" width="1" height="1"&gt;</description></item><item><title>WCF Interop Community</title><link>http://blogs.msdn.com/nathana/archive/2007/02/19/wcf-interop-community.aspx</link><pubDate>Mon, 19 Feb 2007 23:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1718551</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/1718551.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=1718551</wfw:commentRss><description>&lt;P&gt;There's no original content in this post, but here's what people are saying about WCF and ASMX interoperability in the Microsoft forums and other blogs over the last month or so:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;ASMX&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1131814&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;WCF method returning a strongly typed collection to a .NET 2.0 client&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1125700&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Trouble getting a WCF return a collection to a .NET 2.0 client&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1121986&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Issues with generating .net 2.0 client for consuming a WCF service&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1131814&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;WCF method returning a strongly typed collection to a .NET 2.0 client&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1162031&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Making an asynchronous call from a .Net 2.0 client(asmx) to a WCF method&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Java&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1087496&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;netTcpBinding and Java Web Services&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1142719&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;WCF and Java WS client&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1154389&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;WCF bug in message deserialization?&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1189342&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Interop problem: WCF service &amp;amp; Java client &lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1122326&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;.NET/Java double-dimensional (jagged) array interop&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1180486&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Custom Binding requires a Timestamp &lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1136446&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Accessing : &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Other&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.msdn.com/netcfteam/archive/2007/02/01/why-your-netcf-apps-fail-to-call-some-web-services.aspx"&gt;&lt;FONT face=Calibri size=3&gt;Why your NetCF apps fail to call some web services&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Security&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1179866&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;How to Create a SAML token parsing the SOAP / RSTR Response&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1171462&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;WS Security interoperability between Java and .NET web services(Urgent)&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Sun&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.tedneward.com/2007/01/18/Interop+Briefs+Begin+At+The+Beginning.aspx"&gt;&lt;FONT face=Calibri size=3&gt;Interop Briefs: Begin at the Beginning... &lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.sun.com/arungupta/entry/new_wsit_plug_in_coming"&gt;&lt;FONT face=Calibri size=3&gt;New WSIT Plug-in coming&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.sun.com/arungupta/entry/sun_understands_ws_very_well"&gt;&lt;FONT face=Calibri size=3&gt;Sun understands WS-* very well!!!&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://www.tbray.org/ongoing/When/200x/2007/02/04/WS-Microsoft"&gt;&lt;FONT face=Calibri size=3&gt;SOA and WCF&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.sun.com/racingsnake/entry/can_sun_do_ws"&gt;&lt;FONT face=Calibri size=3&gt;Can Sun do WS-*?&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Web Clients&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1091108&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;Connecting to WCF from Javascript\XMLHTTP&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1129123&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;calling a webservice from classic asp - what are the limitations?&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1098525&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri size=3&gt;SOAP Services and XML&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1718551" width="1" height="1"&gt;</description></item><item><title>.Net Framework 3.0 is live</title><link>http://blogs.msdn.com/nathana/archive/2006/11/07/net-framework-3-0-is-live.aspx</link><pubDate>Wed, 08 Nov 2006 01:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1024719</guid><dc:creator>NathanA</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/nathana/comments/1024719.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=1024719</wfw:commentRss><description>&lt;P&gt;WCF and the other goodies are available for download here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&amp;amp;displaylang=en&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1024719" width="1" height="1"&gt;</description></item><item><title>WCF and eBay</title><link>http://blogs.msdn.com/nathana/archive/2006/10/12/wcf-and-ebay.aspx</link><pubDate>Thu, 12 Oct 2006 19:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:820210</guid><dc:creator>NathanA</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/nathana/comments/820210.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nathana/commentrss.aspx?PostID=820210</wfw:commentRss><description>&lt;P&gt;eBay provides a very rich, though very complicated, &lt;A class="" href="http://developer.ebay.com/developercenter/soap" mce_href="http://developer.ebay.com/developercenter/soap"&gt;SOAP API&lt;/A&gt;.&amp;nbsp; It is possible to use WCF with eBay, but it takes a few tricks.&amp;nbsp; First read &lt;A class="" href="http://pluralsight.com/blogs/aaron/archive/2006/04/18/21943.aspx" mce_href="http://pluralsight.com/blogs/aaron/archive/2006/04/18/21943.aspx"&gt;this&lt;/A&gt; article.&amp;nbsp; I'll wait.&amp;nbsp; Ok, since that didn't scare you away I'll continue.&amp;nbsp; Everything there is still necessary except the custom message encoder for removing the quotes around the content type.&amp;nbsp; In fact the basicHttpBinding produced by svcutil.exe is just fine, though bumping up some of the quotas (&lt;FONT size=2&gt;maxNameTableCharCount, &lt;FONT size=2&gt;maxBufferSize, &lt;FONT size=2&gt;maxReceivedMessageSize)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;might not hurt.&amp;nbsp; Now calling GeteBayOfficialTime just works, but graduating to say GetItem, there's another problem.&amp;nbsp; GetItem returns a GetItemResponseType which derives from AbstractResponseType.&amp;nbsp; After successfully calling GetItemResponseType, all the fields it inherits are correctly populated but the fields it defines haven't been.&amp;nbsp; Looking at the response on the wire, those fields are there, for some reason they weren't deserialized.&amp;nbsp; The problem is eBay defined the schema for AbstractResponseType with an xs:any, so the code generated for this type includes an array of XmlElements with the XmlAny attribute:&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;[System.Xml.Serialization.XmlAnyAttribute(Order=12)] &lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; System.Xml.XmlElement[] Any&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;When the response from eBay arrives the XmlSerializer happily begins populating all the fields in AbstractResponseType and anything it doesn't recognize gets put into Any.&amp;nbsp; Now when it's time to populate the fields defined in GetItemResponseType there's no xml left.&amp;nbsp; Given this knowledge it's an easy fix, but unfortunately it involves manually editing the generated proxy.&amp;nbsp; All that's necessary is to change the XmlAnyAttribute to an XmlIgnoreAttribute.&amp;nbsp; Now upon receiving the response, the XmlSerializer "saves" any elements that don't map to AbstractResponseType and uses them to populate GetItemResponseType.&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=820210" width="1" height="1"&gt;</description></item></channel></rss>