<?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>Justin Smith's Blog : Orcas Beta 1</title><link>http://blogs.msdn.com/justinjsmith/archive/tags/Orcas+Beta+1/default.aspx</link><description>Tags: Orcas Beta 1</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Syndication formats, endpoints and config files</title><link>http://blogs.msdn.com/justinjsmith/archive/2007/07/18/syndication-formats-endpoints-and-config-files.aspx</link><pubDate>Wed, 18 Jul 2007 20:54:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3940532</guid><dc:creator>justinjsmith</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/3940532.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=3940532</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=3940532</wfw:comment><description>&lt;p&gt;I got a question via email today that forced me to look back through some older emails for the answer. It may make sense to share the question / answer in a broader sense. &lt;/p&gt; &lt;p&gt;Earlier builds of Orcas surfaced a syndication format to an endpoint by way of a behavior. In essence, you could add a SyndicationBehavior to an endpoint, and that behavior dictated the syndication format for that endpoint (RSS or ATOM). With this model you can specify the syndication format in a config file.&lt;/p&gt; &lt;p&gt;The endpoint centric model for syndication formats is no longer in place. The current model centers on the return type for the operation that returns the syndication. If you want to return a syndication from an operation, you should return a SyndicationFeedFormatter&amp;lt;T&amp;gt; or one of it's derived types (RSS and ATOM types available). In the current incarnation, this removes the config options for syndication formats, but the benefit is worth it (in my opinion).&lt;/p&gt; &lt;p&gt;The motivation for this change (according to Steve Maine) has to do with the embrace of the URI in web-centric programming. Strapping an endpoint to a particular format has undesirable impacts on the URI structures of the service(s). Many customers wanted to serve RSS or ATOM from one URI, and vary the format based on the presence of a query string or an accept header. As a result, the SyndicationBehavior vanished.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3940532" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Syndication/default.aspx">Syndication</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas+Beta+1/default.aspx">Orcas Beta 1</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/REST/default.aspx">REST</category></item><item><title>Podcast with Jon Udell</title><link>http://blogs.msdn.com/justinjsmith/archive/2007/05/30/podcast-with-jon-udell.aspx</link><pubDate>Wed, 30 May 2007 21:33:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2991873</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/2991873.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=2991873</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=2991873</wfw:comment><description>&lt;p&gt;Jon just published a podcast where we discuss how WCF in Orcas simplifies Syndication and RESTful style architectures. Hear it &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=311356"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2991873" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas/default.aspx">Orcas</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Syndication/default.aspx">Syndication</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Framework+3.5/default.aspx">.NET Framework 3.5</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas+Beta+1/default.aspx">Orcas Beta 1</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/REST/default.aspx">REST</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Web+Programming+with+WCF/default.aspx">Web Programming with WCF</category></item><item><title>Web and SOAP via WCF</title><link>http://blogs.msdn.com/justinjsmith/archive/2007/05/07/web-and-soap-via-wcf.aspx</link><pubDate>Mon, 07 May 2007 18:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2464868</guid><dc:creator>justinjsmith</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/2464868.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=2464868</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=2464868</wfw:comment><description>&lt;P&gt;WCF in Orcas introduces several new types that, among other things, dramatically simplify the work needed to write applications that adhere to the protocols of the web. These types of services are commonly described as having a REST-ful architectural style. For the most part, a REST-ful architectural style implies three features:&lt;/P&gt;
&lt;P&gt;1) embracing a URI as the way to identify an operation (as opposed to SOAP Action header blocks)&lt;/P&gt;
&lt;P&gt;2) the universal nature of HTTP GET in HTTP Invokes (PUT, POST, DELETE, &lt;EM&gt;other&lt;/EM&gt;)&lt;/P&gt;
&lt;P&gt;3) Content type is the data model (XML, JSON, binary, etc.)&lt;/P&gt;
&lt;P&gt;WCF is Orcas is almost exclusively built upon extensibility points introduced in WCF v1 (or .NET v3). With that in mind,&amp;nbsp;you can view the Web/REST capabilities of WCF in Orcas as something that could have been built&amp;nbsp;with WCF V1. While this was certainly possible, you would have had to write quite a bit of infrastructure code. Since infrastructure code is typically the hardest to write and test, the introduction of the Web/REST capabilities of WCF in Orcas means that you can focus on the application logic rather than infrastructure code. The impact is that you can deliver more robust services in less time.&lt;/P&gt;
&lt;P&gt;One of the ways WCF in Orcas surfaces the new Web/REST capabilities to developers&amp;nbsp;is&amp;nbsp;a new set of&amp;nbsp;attribute annotations in a service contract:&lt;/P&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;DIV class=csharpcode&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;[ServiceContract]&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;interface&lt;/SPAN&gt; IWebAndSoapContract { &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;  [WebGet(UriTemplate = &lt;SPAN class=str&gt;"SomeOperation"&lt;/SPAN&gt;)]&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;  [OperationContract]&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;  String SomeOperation(); &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;  [WebInvoke(Method=&lt;SPAN class=str&gt;"TEST"&lt;/SPAN&gt;,&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;             UriTemplate=&lt;SPAN class=str&gt;"SomeOtherOperation"&lt;/SPAN&gt;)]&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;  [OperationContract]&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  11:  &lt;/SPAN&gt;  SomeDataContract SomeOtherOperation(SomeDataContract dataContract); &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  12:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  13:  &lt;/SPAN&gt;} &lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;The &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebGetAttribute&lt;/STRONG&gt;&lt;/FONT&gt; annotation indicates that the operation will be available via an HTTP GET. The &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebInvokeAttribute&lt;/STRONG&gt;&lt;/FONT&gt; annotation indicates that the operation should be available via an HTTP operation indicated by the value of the Method property (in this case "Test"). There's much more to say about these attributes. I'll save that for another blog post. The important point to notice is that the contract is nearly identical to a contract in WCF V1. &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;NOTE: the SomeDataContract type is just a simple data contract.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebHttpBinding&lt;/STRONG&gt;&lt;/FONT&gt; and &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebServiceHost&lt;/STRONG&gt;&lt;/FONT&gt; are other types that simplify creating Web/REST services. Like other bindings, the WebHttpBinding creates channel listeners and channel factories. These channel factories and channel listeners, however, are specifically for Web/REST services. I'll discuss what this binding acutally does in subsequent posts. The &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebServiceHost&lt;/STRONG&gt;&lt;/FONT&gt;, on the other&amp;nbsp;hand, adds some &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;ServiceDescription&lt;/STRONG&gt;&lt;/FONT&gt; validation specific to Web/REST services. I'll talk more about these validations in subsequent posts.&lt;/P&gt;
&lt;P&gt;Adding the &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebGetAttribute&lt;/STRONG&gt;&lt;/FONT&gt; and the &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;WebInvokeAttribute&lt;/STRONG&gt;&lt;/FONT&gt; annotation to a service contract does not limit that contract to Web/REST services. You can still use the contract with the &lt;FONT face="Lucida Console"&gt;&lt;STRONG&gt;ServiceHost&lt;/STRONG&gt;&lt;/FONT&gt; that shipped with WCF V1. After all, the attribute annotation is nothing more than extra metadata.&lt;/P&gt;
&lt;P&gt;The following code snippet illustrates how to use the new Web/REST types and how a single contract can be used for SOAP and Web/REST endpoints:&lt;/P&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;DIV class=csharpcode&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;sealed&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;class&lt;/SPAN&gt; Receiver : IWebAndSoapContract { &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;  &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; String SomeOperation() {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;    Console.WriteLine(&lt;SPAN class=str&gt;"SomeOperation invoked"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt; &lt;SPAN class=str&gt;"SomeOperation invoked"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;  } &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;  &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; SomeDataContract SomeOtherOperation(SomeDataContract dataContract) {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;    Console.WriteLine(&lt;SPAN class=str&gt;"SomeOtherOperation invoked"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt; dataContract;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  11:  &lt;/SPAN&gt;  } &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  12:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  13:  &lt;/SPAN&gt;  &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Main() {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  14:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;// web host&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  15:  &lt;/SPAN&gt;    WebHttpBinding webBinding = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; WebHttpBinding();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  16:  &lt;/SPAN&gt;    WebServiceHost webHost = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; WebServiceHost(&lt;SPAN class=kwrd&gt;typeof&lt;/SPAN&gt;(Receiver), &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  17:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(&lt;SPAN class=str&gt;"http://localhost:8000"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  18:  &lt;/SPAN&gt;    webHost.AddServiceEndpoint(&lt;SPAN class=kwrd&gt;typeof&lt;/SPAN&gt;(IWebAndSoapContract), &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  19:  &lt;/SPAN&gt;      webBinding, &lt;SPAN class=str&gt;"webBinding"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  20:  &lt;/SPAN&gt;    webHost.Open();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  21:  &lt;/SPAN&gt;    Console.WriteLine(&lt;SPAN class=str&gt;"The web host is open"&lt;/SPAN&gt;); &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  22:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  23:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;// v1 service host&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  24:  &lt;/SPAN&gt;    NetTcpBinding tcpBinding = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; NetTcpBinding();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  25:  &lt;/SPAN&gt;    ServiceHost v1Host = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ServiceHost(&lt;SPAN class=kwrd&gt;typeof&lt;/SPAN&gt;(Receiver), &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  26:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(&lt;SPAN class=str&gt;"net.tcp://localhost:7000"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  27:  &lt;/SPAN&gt;    v1Host.AddServiceEndpoint(&lt;SPAN class=kwrd&gt;typeof&lt;/SPAN&gt;(IWebAndSoapContract), &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  28:  &lt;/SPAN&gt;      tcpBinding, &lt;SPAN class=str&gt;"tcpBinding"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  29:  &lt;/SPAN&gt;    v1Host.Open();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  30:  &lt;/SPAN&gt;    Console.WriteLine(&lt;SPAN class=str&gt;"the v1 host is open"&lt;/SPAN&gt;); &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  31:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  32:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;// web client&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  33:  &lt;/SPAN&gt;    ChannelFactory&amp;lt;IWebAndSoapContract&amp;gt; factory = &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  34:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ChannelFactory&amp;lt;IWebAndSoapContract&amp;gt;(webBinding, &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  35:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; EndpointAddress(&lt;SPAN class=str&gt;"http://localhost:8000/webBinding"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  36:  &lt;/SPAN&gt;    factory.Endpoint.Behaviors.Add(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; WebHttpBehavior());&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  37:  &lt;/SPAN&gt;    IWebAndSoapContract proxy = factory.CreateChannel();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  38:  &lt;/SPAN&gt;    SomeDataContract returnValue = proxy.SomeOtherOperation(&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  39:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; SomeDataContract(&lt;SPAN class=str&gt;"testing"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  40:  &lt;/SPAN&gt;    Console.WriteLine(&lt;SPAN class=str&gt;"web client sent and received data"&lt;/SPAN&gt;); &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  41:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  42:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;// tcp Client&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  43:  &lt;/SPAN&gt;    factory = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ChannelFactory&amp;lt;IWebAndSoapContract&amp;gt;(tcpBinding, &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  44:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; EndpointAddress(&lt;SPAN class=str&gt;"net.tcp://localhost:7000/tcpBinding"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  45:  &lt;/SPAN&gt;    proxy = factory.CreateChannel();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  46:  &lt;/SPAN&gt;    proxy.SomeOperation();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  47:  &lt;/SPAN&gt;    Console.WriteLine(&lt;SPAN class=str&gt;"the tcp client sent and received data"&lt;/SPAN&gt;); &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  48:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  49:  &lt;/SPAN&gt;  } &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  50:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  51:  &lt;/SPAN&gt;} &lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;The web client part of the previous code snippet makes an HTTP "TEST" call to the HTTP service, and sends a serialized SomeDataContract object. The tcp client sends a SOAP message to the TCP service. In other words, a single contract can be used for both Web/REST services and SOAP services. It's cool stuff indeed.&lt;/P&gt;
&lt;P&gt;In addition to just being cool, this type of functionality means that a choice today does not necessarily limit&amp;nbsp;tomorrow's possibilities.&amp;nbsp;In other words,&amp;nbsp;you can use SOAP services today, and add services that use Web protocols tomorrow without a major overhaul.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2464868" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas/default.aspx">Orcas</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Framework+3.5/default.aspx">.NET Framework 3.5</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas+Beta+1/default.aspx">Orcas Beta 1</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/REST/default.aspx">REST</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Web+Programming+with+WCF/default.aspx">Web Programming with WCF</category></item><item><title>.NET Framework Beta 1 Available for Download</title><link>http://blogs.msdn.com/justinjsmith/archive/2007/04/19/net-framework-beta-1-available-for-download.aspx</link><pubDate>Thu, 19 Apr 2007 22:55:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2196270</guid><dc:creator>justinjsmith</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/justinjsmith/comments/2196270.aspx</comments><wfw:commentRss>http://blogs.msdn.com/justinjsmith/commentrss.aspx?PostID=2196270</wfw:commentRss><wfw:comment>http://blogs.msdn.com/justinjsmith/rsscomments.aspx?PostID=2196270</wfw:comment><description>&lt;p&gt;The .NET Fx 3.5 Beta 1 is now available &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=36B6609E-6F3D-40F4-8C7D-AD111679D8DC&amp;amp;displaylang=en"&gt;here&lt;/a&gt;. Check it out. It's a set of Virtual PC files, so there is no install hocus pocus. Some of the features in .NET Fx 3.5 (as it relates to WCF): WCF web programming, syndication, JSON messages, and integration with workflow.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2196270" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas/default.aspx">Orcas</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/.NET+Framework+3.5/default.aspx">.NET Framework 3.5</category><category domain="http://blogs.msdn.com/justinjsmith/archive/tags/Orcas+Beta+1/default.aspx">Orcas Beta 1</category></item></channel></rss>