<?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>Silverlight Web Services Team : tools</title><link>http://blogs.msdn.com/silverlightws/archive/tags/tools/default.aspx</link><description>Tags: tools</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Some known issues in SL3 Beta</title><link>http://blogs.msdn.com/silverlightws/archive/2009/04/05/some-known-issues-in-sl3-beta.aspx</link><pubDate>Mon, 06 Apr 2009 08:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9534200</guid><dc:creator>SLWSTeam</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/silverlightws/comments/9534200.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlightws/commentrss.aspx?PostID=9534200</wfw:commentRss><description>&lt;P&gt;We've run across some issues with our web services features in the Silverlight 3 Beta and I want to share these here to hopefully save folks some time and frustration.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt; On Windows 7 Beta, you might encounter the following error when generating a proxy: "The element 'httpTransport' cannot contain child element 'extendedProtectionPolicy' because the parent element's content model is empty".&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Workaround:&lt;/STRONG&gt; On Windows 7, when you use the &lt;STRONG&gt;Silverlight-enabled WCF Service&lt;/STRONG&gt; item template, an &amp;lt;extendedProtectionPolicy /&amp;gt; element may be generated in Web.config. This element is not supported by Silverlight. Simply remove the element from Web.config and try regenerating the Silverlight proxy.&lt;/P&gt;
&lt;HR&gt;

&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Issue: &lt;/STRONG&gt;If you use the &lt;STRONG&gt;Silverlight-enabled WCF Service&lt;/STRONG&gt; template and you try generating a Silverlight proxy using &lt;STRONG&gt;Add Service Reference&lt;/STRONG&gt; on a machine with &lt;U&gt;both&lt;/U&gt; Silverlight 2 and Silverlight 3 Beta SDKs, you may get warnings at proxy generation time and errors at runtime. The warnings can include a variety of "Cusom tool" warnings which state that the endpoints found are "not compatible with Silverlight 2" or "No endpoints compatible with Silverlight 2 were found."&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Workaround:&lt;/STRONG&gt; If you are using &lt;STRONG&gt;Add Service Reference &lt;/STRONG&gt;to generate proxies, side-by-side installation of the Silverlight 2 and Silverlight 3 Beta SDKs is not supported. Please uninstall the Silverlight 2 SDK to use Silverlight 3 features. After uninstalling, ensure that the assembly Microsoft.Silverlight.ServiceReference is &lt;U&gt;not&lt;/U&gt; present in the machine GAC. &lt;/P&gt;
&lt;HR&gt;

&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt; When using &lt;STRONG&gt;Add Service Reference&lt;/STRONG&gt; to generate a proxy to a WCF duplex service (a service built with the System.ServiceModel.PollingDuplex.dll assembly provided in the Silverlight SDK), the generated proxy may not compile and may complain about a missing assembly reference.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Workaround: &lt;/STRONG&gt;The proxy for the duplex service is generated correctly, however &lt;STRONG&gt;Add Service Reference &lt;/STRONG&gt;will sometimes forget to reference th &lt;STRONG&gt;System.ServiceModel.PollingDuplex.dll &lt;/STRONG&gt;assembly in the Silverlight client. Simply add a reference to the assembly (right-click in the Silverlight project, select &lt;STRONG&gt;Add Reference&lt;/STRONG&gt;, find the assembly in the list on the &lt;STRONG&gt;.Net&lt;/STRONG&gt; tab), and the proxy should now compile.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Hope this is helpful!&lt;BR&gt;-Yavor Georgiev&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9534200" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlightws/archive/tags/debugging/default.aspx">debugging</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/duplex/default.aspx">duplex</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/tools/default.aspx">tools</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/bugs/default.aspx">bugs</category></item><item><title>Some new features for REST services</title><link>http://blogs.msdn.com/silverlightws/archive/2009/03/13/some-new-features-for-rest-services.aspx</link><pubDate>Fri, 13 Mar 2009 20:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9473462</guid><dc:creator>SLWSTeam</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/silverlightws/comments/9473462.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlightws/commentrss.aspx?PostID=9473462</wfw:commentRss><description>&lt;P&gt;Just a quick announcement here of a release that will be interesting to SL developers who want to access REST services. The &lt;STRONG&gt;WCF REST Starter Kit Preview 2&lt;/STRONG&gt; is now out, go grab it at &lt;A href="http://msdn.com/wcf/rest"&gt;http://msdn.com/wcf/rest&lt;/A&gt;. The release gives you a polished install/uninstall experience, so don't be afraid to try it on your box, it won't muck it up like "preview" software so frequently does.&lt;/P&gt;
&lt;P&gt;This release gives you one interesting client-side feature that you may have heard me or &lt;A title="Eugene's blog" href="http://eugeneos.blogspot.com/" mce_href="http://eugeneos.blogspot.com/"&gt;Eugene&lt;/A&gt; speak about: &lt;STRONG&gt;Paste XML as Types&lt;/STRONG&gt;. It's a VS menu item which helps you use &lt;STRONG&gt;XmlSerializer&lt;/STRONG&gt; with REST services. Frequently these services use human-readable documentation to describe the XML shape, and it is difficult to &lt;STRONG&gt;hand-code &lt;/STRONG&gt;a type to use with &lt;STRONG&gt;XmlSerializer&lt;/STRONG&gt;, especially when the XML instance is complex. For example check out this &lt;A title="XML example from Yahoo BOSS" href="http://developer.yahoo.com/search/boss/boss_guide/Web_Search.html#id311445" mce_href="http://developer.yahoo.com/search/boss/boss_guide/Web_Search.html#id311445"&gt;sample XML response &lt;/A&gt;from the Yahoo BOSS API. With this new feature it takes&lt;STRONG&gt; one click&lt;/STRONG&gt; to generate the type:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 679px; HEIGHT: 527px" title="Using Paste XML as Types with Yahoo BOSS API" alt="Using Paste XML as Types with Yahoo BOSS API" src="http://blogs.msdn.com/photos/silverlightws/images/9473440/original.aspx" width=679 height=527 mce_src="http://blogs.msdn.com/photos/silverlightws/images/9473440/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Another interesting feature in the release is &lt;STRONG&gt;HttpClient &lt;/STRONG&gt;- a sort of specialized WebClient&amp;nbsp;- which can be used to programmatically access REST services using an extensible model for sending HTTP requests and processing HTTP responses. The model enables you to complete common HTTP/REST development activities required to consume an existing service in a fraction of the time you normally spend. Some convenient time-savers include query string support (build URIs as name/value pairs) and&amp;nbsp;serialization support (easily plug in types generated with &lt;STRONG&gt;Paste XML as Types &lt;/STRONG&gt;to read the response). &lt;/P&gt;
&lt;P&gt;Unfortunately in this release the starter kit &lt;STRONG&gt;only contains a .Net version of HttpClient&lt;/STRONG&gt;, which will &lt;U&gt;not&lt;/U&gt; compile in Silverlight. We are considering porting this prototype to Silverilght, and if you get a chance to try it&amp;nbsp;on .Net, please let us know of any feedback&amp;nbsp;you have.&lt;/P&gt;
&lt;P&gt;Stay tuned for some exciting content coming out over the next week!&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR&gt;-Yavor&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9473462" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlightws/archive/tags/pox/default.aspx">pox</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/tools/default.aspx">tools</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/rest/default.aspx">rest</category></item><item><title>New Web Services Features in Silverlight 2 RTW</title><link>http://blogs.msdn.com/silverlightws/archive/2008/10/20/new-web-services-features-in-sl2-rtw.aspx</link><pubDate>Mon, 20 Oct 2008 16:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9001471</guid><dc:creator>SLWSTeam</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/silverlightws/comments/9001471.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlightws/commentrss.aspx?PostID=9001471</wfw:commentRss><description>&lt;P&gt;Here is an overview of the new features added since Beta 2.&lt;/P&gt;
&lt;H3&gt;SOAP Headers&lt;/H3&gt;
&lt;P&gt;SOAP headers were a big customer request, so we have added&amp;nbsp;headers support in this release. There are two methods to use headers, depending on the customer scenario.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The &lt;U&gt;easier method&lt;/U&gt; is useful when you need to get/set a header while invoking a single operation on the service.&amp;nbsp;&lt;/STRONG&gt;You can&amp;nbsp;use the&amp;nbsp;&lt;A class="" title="OperationContext class" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext(VS.95).aspx"&gt;OperationContext&lt;/A&gt; class, and specifically the &lt;A class="" title="OperationContext.IncomingMessageHeaders property" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext.incomingmessageheaders(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext.incomingmessageheaders(VS.95).aspx"&gt;IncomingMessageHeaders&lt;/A&gt; or &lt;A class="" title="OperationContext.OutgoingMessageHeaders property" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext.outgoingmessageheaders(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext.outgoingmessageheaders(VS.95).aspx"&gt;OutgoingMessageHeaders&lt;/A&gt; property to receive or send a header. Below is a code example where the client sends the header &lt;CODE&gt;&amp;lt;MyClientHeader xmlns="http://silverlight.net"&amp;gt;...&amp;lt;/MyClientHeader&amp;gt;&lt;/CODE&gt; to the service.&lt;/P&gt;&lt;CODE&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Page()&lt;BR&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Instantiate generated proxy&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Client&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; proxy = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Client&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Hook up an event handler when operation completes&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;proxy.DoWorkCompleted += &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;EventHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;DoWorkCompletedEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt;(proxy_DoWorkCompleted);&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;OperationContextScope&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; ocs = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;OperationContextScope&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(proxy.InnerChannel))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// We can add "MyClientHeader" SOAP header to the outgoing message. It is important that this comes before calling the operation.&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;OperationContext&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.Current.OutgoingMessageHeaders.Add(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;MessageHeader&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.CreateHeader(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"MyClientHeader"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"http://silverlight.net"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"..."&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;));&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;// Call an operation on the service&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proxy.DoWorkAsync(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"foo"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/CODE&gt;Now assume we want to get at a header that the service sent back.&amp;nbsp;In this example, the service sent the &lt;CODE&gt;&amp;lt;MyServiceHeader xmlns="http://silverlight.net"&amp;gt;...&amp;lt;/MyServiceHeader&amp;gt;&lt;/CODE&gt; header to the client. &lt;STRONG&gt;Note: &lt;/STRONG&gt;The old Begin*/End* async pattern needs to be used with &lt;STRONG&gt;OperationContext &lt;/STRONG&gt;&lt;U&gt;if you are retrieving the headers sent in a service reply&lt;/U&gt;. The event-based async pattern (using *Completed&amp;nbsp;event and *Async method) is currently not supported. Also, please be sure to use exact order of calls demonstrated below.&lt;/P&gt;&lt;CODE&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Page()&lt;BR&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Instantiate generated proxy&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Service1Client&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; proxy = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Client&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Call an operation on the service using Begin/End async pattern&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;((&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)proxy).BeginDoWork(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"foo"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, doWorkCallback, proxy);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;// Receive callback when the service responds&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; doWorkCallback(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;IAsyncResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; result)&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Service1&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; proxy = (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)result.AsyncState;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;OperationContextScope&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; ocs = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;OperationContextScope&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(((&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Client&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)proxy).InnerChannel))&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Get the service response. This needs to happen before we access the headers.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; response = proxy.EndDoWork(result);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Now we can access the headers of the incoming message. In this case we assume the header "MyServiceHeader" was sent by the service.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; headerContents = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;OperationContext&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.Current.IncomingMessageHeaders.GetHeader&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"MyServiceHeader"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"http://silverlight.net"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Do something with response and header&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The &lt;U&gt;harder method&lt;/U&gt;&amp;nbsp;can be used when you want to get/set headers upon invoking any operation on the service. &lt;/STRONG&gt;In that case you would have to use &lt;STRONG&gt;OperationContext&lt;/STRONG&gt; every time you call a service operation, which is very clunky. Instead, what would be useful is functionality similar to that provided by WCF message inspectors and the &lt;A class="" title="IClientMessageInspector class" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iclientmessageinspector.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iclientmessageinspector.aspx"&gt;IClientMessageInspector&lt;/A&gt; class. Using a client message inspector you can get access to the &lt;A class="" title="Message class" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.message(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.message(VS.95).aspx"&gt;Message&lt;/A&gt; instance just received from or about to be sent to the service, and manipulate the headers directly on the instance. &lt;STRONG&gt;IClientMessageInspector&lt;/STRONG&gt; is not part of SL 2, but &lt;A class="" title="Message Inspectors code sample" href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=silverlightws&amp;amp;DownloadId=3473" mce_href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=silverlightws&amp;amp;DownloadId=3473"&gt;this code sample&lt;/A&gt; demonstrates how to accomplish the same functionality. In the sample, we add a header to every message sent to the service, and the header contains the IP address of the client which is calling the service.&lt;/P&gt;
&lt;H3&gt;SOAP Faults&lt;/H3&gt;
&lt;P&gt;&lt;A class="" title="Eugene's blog" href="http://eugeneos.blogspot.com/" mce_href="http://eugeneos.blogspot.com/"&gt;Eugene&lt;/A&gt; &lt;A class="" title="Eugene on Silverlight SOAP faults" href="http://eugeneos.blogspot.com/2008/09/faults-and-exceptions-when-using-web.html" mce_href="http://eugeneos.blogspot.com/2008/09/faults-and-exceptions-when-using-web.html"&gt;posted about faults&lt;/A&gt; just a couple of weeks back. Faults are another major request but unfortunately they are not supported out of the box in SL 2. However,&amp;nbsp;using the same client message inspectors approach and some extra configuration on the&amp;nbsp;WCF service side,&amp;nbsp;rudimentary faults can&amp;nbsp;be enabled. The &lt;A class="" title="Message Inspectors code sample" href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=silverlightws&amp;amp;DownloadId=3473" mce_href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=silverlightws&amp;amp;DownloadId=3473"&gt;same code sample linked above&lt;/A&gt; demonstrates how to do this. I will put together a more detailed post about the sample in the coming weeks.&lt;/P&gt;
&lt;H3&gt;Reusing existing types in "Add Service Reference"&lt;/H3&gt;
&lt;P&gt;If you use "Add Service Reference" to add a reference to the service in your client, it will by default generate a duplicate of any type used by your service operation. Frequently when developing a WCF service and a Silverlight client, you want to declare your types in only one place. Alternatively, maybe your data contract types contain internal logic that you would like to preserve and that logic is lost when "Add Service Reference" generates the duplicate types in the client.&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Reusing types in Add Service Reference" style="WIDTH: 454px; HEIGHT: 421px" height=421 alt="Reusing types in Add Service Reference" src="http://blogs.msdn.com/photos/silverlightws/images/9001562/original.aspx" width=454 align=absMiddle mce_src="http://blogs.msdn.com/photos/silverlightws/images/9001562/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;To prevent duplicate types from being generated in the client, you would normally declare the data contract types in a new project, which is referenced by both your WCF service and the Silverlight client. Then when adding a reference to the service, you would&amp;nbsp;select the correct option in the "Add Service Reference" dialog. This way "Add Service Reference" would find the types already referenced in the shared project, and not generate duplicates.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;In Silverlight the shared project that contains the data contract types has to be a "Silverlight Library", which can be referenced by both Silverlight projects and regular desktop framework projects. If the shared project is of any other type, you will not be able to reference it from within a "Silverlight Application" project.&lt;/P&gt;
&lt;P&gt;This option was already there in the Silverlight version of "Add Service Reference", but it did not work up until this release.&lt;/P&gt;
&lt;H3&gt;Duplex Services&lt;/H3&gt;
&lt;P&gt;We have made improvements to the duplex channel shipped in Beta 2:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Client and server side duplex components are now &lt;STRONG&gt;ready for production use&lt;/STRONG&gt;, with improved stability, security, etc. In Beta 2 the server-side duplex component was under an "evaluation" license.&lt;/LI&gt;
&lt;LI&gt;Server-side duplex component may now be &lt;STRONG&gt;hosted in Partial Trust&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Default timeouts and timeout behavior is “smarter”&lt;/STRONG&gt; – no changes should be required for common scenarios&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;In addition, &lt;A class="" title="Eugene's blog" href="http://eugeneos.blogspot.com/" mce_href="http://eugeneos.blogspot.com/"&gt;Eugene&lt;/A&gt; has developed &lt;A class="" title="Duplex Receiver sample" href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=silverlightws&amp;amp;DownloadId=3472" mce_href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=silverlightws&amp;amp;DownloadId=3472"&gt;a great sample&lt;/A&gt; on top of the raw duplex channel model, to simplify duplex usage. On the client side you can use the &lt;STRONG&gt;DuplexReceiver &lt;/STRONG&gt;class:&lt;/P&gt;&lt;CODE&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;DuplexReceiver&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;// Opens a channel to the service to receive messages using the default PollingDuplexBinding&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; DuplexReceiver(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Uri&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; address, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;IEnumerable&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Type&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; possibleTypes);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Opens a channel to the service to receive messages using the default PollingDuplexBinding&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; DuplexReceiver(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;EndpointAddress&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; address, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;IEnumerable&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Type&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; possibleTypes);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Sends a message to a Duplex service. (The first time a message is sent, connection will be established to the service).&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SendMessageAsync(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; message);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Event that will be called after a message has been sent&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;event&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;EventHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;AsyncCompletedEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; SendMessageCompleted;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Event that will be called for each received message&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;event&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;EventHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;ReceivedMessageEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; MessageReceived;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Disconnects from a Duplex service (can later reconnect again). To permanently close, first call DisconnectAsync and then call Close&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; DisconnectAsync();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Closes the Duplex connection&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Close();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Other methods and properties omitted for brevity...&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;/CODE&gt;
&lt;P&gt;Instead of using the channel model directly, you can use the &lt;STRONG&gt;SendMessageAsync&lt;/STRONG&gt; method to send messages to the service. The &lt;STRONG&gt;MessageReceived&lt;/STRONG&gt; event is fired when the service sends the client a message. Note that the DuplexReceiver contructor takes the list of types that can possibly be sent. The sample also provides a server-side &lt;STRONG&gt;DuplexService&lt;/STRONG&gt; object, which keeps track of connected clients and can relay messages to the correct recipient, or broadcast messages to all clients.&lt;/P&gt;
&lt;H3&gt;Support for ChannelFactory&amp;lt;T&amp;gt;&lt;/H3&gt;
&lt;P&gt;This is an advanced use case: say you want to use a service without generating a proxy to it. Perhaps you are connecting to a complex service and you manually copied over/shared all the contracts and types that the service uses (for example in order to preserve the internal logic of these types). But you never&amp;nbsp;used the&amp;nbsp;"Add Service Reference" wizard so you don't have a proxy class to the service. In this case ChannelFactory&amp;lt;T&amp;gt; can be used to communicate&amp;nbsp;with a service which&amp;nbsp;implements&amp;nbsp;the service contract &amp;lt;T&amp;gt;, as shown&amp;nbsp;below.&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Page()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;ChannelFactory&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Channel&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; factory = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;ChannelFactory&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Channel&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt;(&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;BasicHttpBinding&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(),&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;EndpointAddress&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"http://localhost:49507/Service1.svc"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;));&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Service1Channel&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; channel = factory.CreateChannel();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; channel.BeginDoWork(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;AsyncCallback&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(doWorkCallback), channel);&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; doWorkCallback(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;IAsyncResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; result)&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Service1Channel&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; channel = (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Service1Channel&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)result.AsyncState;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; response = channel.EndDoWork(result);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;// Do something with response&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;/CODE&gt;
&lt;P&gt;Note that using this approach, the event-based async pattern is not supported.&lt;/P&gt;
&lt;H3&gt;Other&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Types generated from ADO.NET Entity Data Models (.edmx files)&amp;nbsp;&lt;/STRONG&gt;in WCF services intended for Silverlight consumption are now supported. Just use the type generated from a .edmx model as an argument in&amp;nbsp;a service operation.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Internal types and internal members &lt;/STRONG&gt;may now be serialized by the &lt;A class="" title="DataContractSerializer class" href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer(VS.95).aspx"&gt;DataContractSerializer&lt;/A&gt; and the &lt;A class="" title="DataContractJsonSerializer class" href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer(VS.95).aspx"&gt;DataContractJsonSerializer&lt;/A&gt; (on a per-assembly opt-in basis)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;JSON/XML Mapping&lt;/STRONG&gt; is now supported (through System.Runtime.Serialization.Json.dll in the SDK), by using the &lt;A class="" title="JsonReaderWriterFactory class" href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.jsonreaderwriterfactory(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.jsonreaderwriterfactory(VS.95).aspx"&gt;JsonReaderWriterFactory&lt;/A&gt; class.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;JAXB-style object references &lt;/STRONG&gt;in XML are now supported by &lt;STRONG&gt;DataContractSerializer&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Have fun using our new feature set!&lt;/P&gt;
&lt;P&gt;Yavor Georgiev&lt;BR&gt;Program Manager, Connected Framework Team&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9001471" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlightws/archive/tags/wcf/default.aspx">wcf</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/soap/default.aspx">soap</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/duplex/default.aspx">duplex</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/tools/default.aspx">tools</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/channels/default.aspx">channels</category></item><item><title>Detailed Overview of Silverlight 2 Beta 2 Web Service Features</title><link>http://blogs.msdn.com/silverlightws/archive/2008/06/10/detailed-overview-of-silverlight-2-beta-2-web-service-features.aspx</link><pubDate>Tue, 10 Jun 2008 11:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8589374</guid><dc:creator>SLWSTeam</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/silverlightws/comments/8589374.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlightws/commentrss.aspx?PostID=8589374</wfw:commentRss><description>&lt;P&gt;As&amp;nbsp;you have probably read already (in &lt;A class="" title="ScottGu's blog" href="http://weblogs.asp.net/scottgu/archive/2008/06/06/silverlight-2-beta2-released.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2008/06/06/silverlight-2-beta2-released.aspx"&gt;Scott&lt;/A&gt; or &lt;A class="" title="Tim Heuer's blog" href="http://timheuer.com/blog/archive/2008/06/06/changes-to-accessing-services-in-silverlight-2-beta-2.aspx" mce_href="http://timheuer.com/blog/archive/2008/06/06/changes-to-accessing-services-in-silverlight-2-beta-2.aspx"&gt;Tim's&lt;/A&gt; posts), Silverlight 2 Beta 2 provides a set of new and improved web service features. This post will go over our Beta 2 scenarions in more detail, and we intend to follow up over the next couple of weeks and drill down into particualr features.&lt;/P&gt;
&lt;H4&gt;Duplex Communication (Server Push)&lt;/H4&gt;
&lt;P&gt;This has been the most requested feature from our customers since the release of Beta 1, and it enables some useful scenarios like building chat and monitoring apps. Duplex allows the client to expose a set of operations that the server can call to send (push) information to the client. Previously addressing the browser-based client was not possible using the web service stack, so we are very excited to ship this feature in Beta 2.&lt;/P&gt;
&lt;P&gt;Duplex support is delivered in two assemblies: one that plugs into your WCF service, and the other one which plugs in to the Silverlight client. Once you install the Beta 2 SDK, you will get the following assemblies:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server\Evaluation\System.ServiceModel.PollingDuplex.dll&lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;This is the server-side assembly. For details on it usage and how to build a duplex WCF service, &lt;A class="" title="How to: Build a Duplex Service" href="http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx"&gt;see this topic in the documentation&lt;/A&gt;. The assembly provides you with the server-side &lt;STRONG&gt;PollingDuplexBindingElement&lt;/STRONG&gt;, which allows you to build a custom binding, You can then build a custom &lt;A class="" title=System.ServiceModel.ServiceHost href="http://msdn.microsoft.com/en-us/library/system.servicemodel.servicehost.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.servicehost.aspx"&gt;&lt;STRONG&gt;ServiceHost&lt;/STRONG&gt;&lt;/A&gt;, which uses the custom binding to host your service contract. A service contract hosted this way will support &lt;A class="" title=ServiceContractAttribute.CallbackContract href="http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.callbackcontract.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.callbackcontract.aspx"&gt;&lt;STRONG&gt;ServiceContractAttribute.CallbackContract&lt;/STRONG&gt;&lt;/A&gt;, which is how you specify the client operations that the service can call. The topic referenced above goes through all these details and shows you a finished duplex WCF service.&lt;BR&gt;&lt;BR&gt;You may have noticed the "Evaluation" folder name in the path. This assembly is provided on a different license than the rest of the Beta 2 product, and is not meant for production apps. We intend to put some more work into the API and tune the performance before this component is ready for production environments.&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Client\System.ServiceModel.PollingDuplex.dll&lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;This is the client-side duplex assembly. For details on its usage and how to build a Silverilght client for a WCF duplex service, &lt;A class="" title="How to: Access a Duplex Service with the Channel Model" href="http://msdn.microsoft.com/en-us/library/cc645028(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc645028(VS.95).aspx"&gt;see this topic in the documentation&lt;/A&gt;. The assembly provides you with the client-side &lt;A class="" title=PollingDuplexHttpBinding href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding(VS.95).aspx"&gt;&lt;STRONG&gt;PollingDuplexHttpBinding&lt;/STRONG&gt;&lt;/A&gt;, which can be used to create a channel to talk to the WCF duplex service. This is covered by the above topic.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;You might remember &lt;A class="" title='"Pushing" Data to a Silverlight Application' href="http://eugeneos.blogspot.com/2008/04/pushing-data-to-silverlight-application.html" mce_href="http://eugeneos.blogspot.com/2008/04/pushing-data-to-silverlight-application.html"&gt;Eugene's blog post&lt;/A&gt;, which talks about a typed "receiver" experience, which also takes care of deserialization. We are working on this and will likely release it as a code sample on silverlight.net in the coming weeks.&lt;/P&gt;
&lt;H4&gt;LINQ over JSON&lt;/H4&gt;
&lt;P mce_keep="true"&gt;Many web services provide APIs which return JSON data instead of POX or SOAP, and we want to make sure Silverlight provides great support for these types of services. So far the only way to interact with JSON in Silverlight has been to deserialize it into a type, which we have defined already to match the structure of the JSON. However this becomes impractical for APIs that return a lot of JSON data. Take Facebook for example: just asking for a user's information returns almost a page of JSON, and it would be impractical for a Silverilght developer to have to construct a type to match this JSON, especially if the Silverlight app is a mashup and interacts with multiple complex JSON APIs. In situations like this, we would prefer to "dot into" the JSON object and treat it&amp;nbsp;as more of&amp;nbsp;a dictionary, as opposed through the&amp;nbsp;deserialization mechanism.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Beta 2 introduces a brand new feature called &lt;A class="" title=JsonObject href="http://msdn.microsoft.com/en-us/library/system.json.jsonobject(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.json.jsonobject(VS.95).aspx"&gt;JsonObject&lt;/A&gt;, which is also new to the .Net platform. JsonObject allows you to "parse" a JSON string and then use it as a dictionary in Silverlight, as shown in &lt;A class="" title="Working with JSON Data" href="http://msdn.microsoft.com/en-us/library/cc197957(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc197957(VS.95).aspx"&gt;this documentation topic&lt;/A&gt;. Using the following JSON string as an example,&lt;/P&gt;&lt;CODE&gt;[{"IsMember" : true, "Name" : "John", "Age" : 24}, &lt;BR&gt;{"IsMember" : false, "Name" : "Paul", "Age" : 44},&lt;BR&gt;{"IsMember" : true, "Name" : "George", "Age" : 12}]&lt;BR&gt;&lt;/CODE&gt;
&lt;P&gt;we can parse it into the &lt;STRONG&gt;JsonObject users&lt;/STRONG&gt;, and then access its members this way: &lt;CODE&gt;&lt;FONT size=2&gt;users[0][&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Name"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;/FONT&gt;, &lt;FONT size=2&gt;users[1][&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Age"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;/FONT&gt;&lt;/CODE&gt;, etc. We can then construct LINQ expressions such as &lt;/P&gt;&lt;CODE&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt; members = &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt; member &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;in&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt; users&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;where&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt; member[&lt;/FONT&gt;&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"IsMember"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt;]&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;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt; member;&lt;/FONT&gt;&lt;/P&gt;&lt;/CODE&gt;
&lt;P mce_keep="true"&gt;The &lt;A class="" title="FoodFinder Sample" href="http://silverlight.net/samples/2b2/foodfinder/run/default.html" mce_href="http://silverlight.net/samples/2b2/foodfinder/run/default.html"&gt;FoodFinder sample on silverlight.net&lt;/A&gt; provides a real usage example of the Yahoo! Local JSON API (&lt;A class="" title="FoodFinder Sample Source Code" href="http://silverlight.net/samples/2b2/foodfinder/foodfinder.zip" mce_href="http://silverlight.net/samples/2b2/foodfinder/foodfinder.zip"&gt;download the source code&lt;/A&gt;). The following LINQ query is used by the sample to dynamically filter the results returned by the service based on two sliders that the user controls.&lt;/P&gt;&lt;CODE&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; members = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; restaurant &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;JsonArray&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)results[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"ResultSet"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;][&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Result"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;]&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;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;where&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;float&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.Parse(restaurant[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Rating"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;][&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"AverageRating"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;]) &amp;gt;= rating.Value&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&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; where&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;float&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.Parse(restaurant[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Distance"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;]) &amp;lt; distance.Value&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;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; restaurant;&lt;/FONT&gt;&lt;/P&gt;&lt;/CODE&gt;
&lt;H4&gt;Configuration Support&lt;/H4&gt;
&lt;P&gt;In Beta 1, the binding and endpoint address had to be specified in code and passed as parameters to the proxy constructor. &lt;/P&gt;&lt;CODE&gt;
&lt;P&gt;&lt;FONT color=#2b91af size=2&gt;BasicHttpBinding&lt;/FONT&gt;&lt;FONT size=2&gt; binding = &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=#2b91af size=2&gt;BasicHttpBinding&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EndpointAddress&lt;/FONT&gt;&lt;FONT size=2&gt; address = &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=#2b91af size=2&gt;EndpointAddress&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;A href="http://localhost/service.svc"&gt;http://localhost/service.svc&lt;/A&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&lt;FONT color=#2b91af&gt;ServiceClient&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;proxy = &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=#2b91af size=2&gt;ServiceClient&lt;/FONT&gt;&lt;FONT size=2&gt;(binding, address);&lt;/FONT&gt;&lt;/P&gt;&lt;/CODE&gt;
&lt;P&gt;In Beta 2 the "Add Service Reference" feature in Visual Studio will generate a &lt;STRONG&gt;ServiceReference.clientConfig &lt;/STRONG&gt;file, which will contain the binding and address configuration informaton, and the proxy can be constructed with its default constructor.&lt;/P&gt;&lt;CODE&gt;
&lt;P&gt;&lt;FONT color=#2b91af&gt;ServiceClient&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;proxy = &lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;ServiceClient&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;/CODE&gt;
&lt;P&gt;This allows us to change the binding/address without needing to recompile the Silverlight control. In addition configuration exposes some&amp;nbsp;knobs on the binding, which can be tweaked for security or performance reasons:&lt;/P&gt;&lt;CODE&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;binding &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;name&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;BasicHttpBinding_IService&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;" &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;closeTimeout&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;00:59:00&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;" &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;openTimeout&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;00:53:00&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;receiveTimeout&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;00:15:00&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;" &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;sendTimeout&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;00:21:00&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;" &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;maxBufferSize&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;65530&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;maxReceivedMessageSize&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;65531&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;" &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#ff0000 size=2&gt;textEncoding&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;utf-8&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/CODE&gt;
&lt;P&gt;&lt;A class="" title="Configuring Web Service Usage in Silverlight Clients" href="http://msdn.microsoft.com/en-us/library/cc197941(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc197941(VS.95).aspx"&gt;This documentation topic &lt;/A&gt;explains the different settings available.&lt;/P&gt;
&lt;H4&gt;Tooling Improvements&lt;/H4&gt;
&lt;P&gt;We have added the "Silverlight-enalbled WCF Service" Item template.&amp;nbsp;When a WCF service is added using this template, the binding&amp;nbsp;in the service configuration is automatically switched to basicHttpBinding.&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Silverlight-enabled WCF Service Item Template" style="WIDTH: 630px; HEIGHT: 527px" height=527 alt="Silverlight-enabled WCF Service Item Template" src="http://blogs.msdn.com/photos/silverlightws/images/8589685/original.aspx" width=630 mce_src="http://blogs.msdn.com/photos/silverlightws/images/8589685/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;IntelliSense over .clientConfig files is now supported. As you start editing the file you will get useful popups with the supported schema.&lt;/P&gt;
&lt;P&gt;&lt;IMG title="IntelliSense over .clientConfig" style="WIDTH: 638px; HEIGHT: 185px" height=185 alt="IntelliSense over .clientConfig" src="http://blogs.msdn.com/photos/silverlightws/images/8589683/original.aspx" width=638 mce_src="http://blogs.msdn.com/photos/silverlightws/images/8589683/original.aspx"&gt;&lt;/P&gt;
&lt;H4&gt;SOAP Improvements&lt;/H4&gt;
&lt;P&gt;We have made some general SOAP improvements in Beta 2:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Custom SOAP headers and faults in service - ignored and don't generate uncompilable code&lt;/LI&gt;
&lt;LI&gt;“Wildcard” schema in service (like xsd:any or xsd:anyattribute) - now works and doesn't generate uncompilable code&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;And specifically if your service is a WCF (or in some cases .ASMX) service:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;XML types like XmlElement/XElement/XmlNode[]/XmlAttribute/etc in service - now&amp;nbsp;work and don't generate uncompilable code&lt;/LI&gt;
&lt;LI&gt;Types that implement ISerializable in your service (except for collections) - now work and don't generate uncompilable code&lt;/LI&gt;
&lt;LI&gt;Stream type in service - now works and doesn't generate uncompilable code&lt;/LI&gt;
&lt;LI&gt;MessageHeaderAttribute in Message Contracts - ignored and doesn't generate uncompilable code&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Please keep an eye on this blog for more specifics in the next couple of weeks.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR&gt;-Yavor Georgiev&lt;BR&gt;Program Manager, Connected Framework Team&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8589374" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlightws/archive/tags/json/default.aspx">json</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/soap/default.aspx">soap</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/duplex/default.aspx">duplex</category><category domain="http://blogs.msdn.com/silverlightws/archive/tags/tools/default.aspx">tools</category></item></channel></rss>