<?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>A Cup of Silverlight, RIA &amp; Interoperability : XML/REST</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx</link><description>Tags: XML/REST</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Eclipse4SL : M2 released + REST and SOAP Guidance</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2009/01/11/eclipse4sl-M2-REST-SOAP-Java-interoperability-Silverlight.aspx</link><pubDate>Mon, 12 Jan 2009 00:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9306359</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/9306359.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=9306359</wfw:commentRss><description>&lt;P&gt;The &lt;A href="http://www.eclipse4sl.org/" mce_href="http://www.eclipse4sl.org/"&gt;Eclipse Tools for Silverlight&lt;/A&gt; enter year 2009 after achieving its 2008 commitments !&lt;/P&gt;
&lt;P&gt;First of all, SOYATEC did a great job &lt;STRONG&gt;at correcting more than 30 bugs&lt;/STRONG&gt; (and 200 unit tests to ensure first quality) &lt;STRONG&gt;but also at enhancing the plug-in to provide a better support for Silverlight&lt;/STRONG&gt; (improvement of the XAML editor, support for Styles and Embedded Custom Components in XAML preview…). &lt;/P&gt;
&lt;P&gt;To get the full list of features, see this detailed blog entry: &lt;A href="http://www.eclipse4sl.org/blog/announcement/new-release-100-m2-is-available/" mce_href="http://www.eclipse4sl.org/blog/announcement/new-release-100-m2-is-available/"&gt;Release 1.0.0 M2 is ready&lt;/A&gt;. Moreover, when you install the plug-in, you are now given the options to also install the source code and/or documentation.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_4.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-LEFT: 0px; MARGIN-RIGHT: auto; BORDER-BOTTOM: 0px" height=148 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_thumb_1.png" width=240 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Second, guidance is now provided to connect Silverlight applications to Java business logic. Because REST and SOAP make sense, we chose to provide guidance for both. We also chose to use opensource frameworks and tools, such as the Tomcat server runtime :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.eclipse4sl.org/documentation/userdoc/html/webservice/restlet/index.php" mce_href="http://www.eclipse4sl.org/documentation/userdoc/html/webservice/restlet/index.php"&gt;REST guidance&lt;/A&gt; : the Restlet framework from &lt;A href="http://www.noelios.com/" mce_href="http://www.noelios.com/"&gt;Noelios Technologies&lt;/A&gt; was chosen to illustrate the Silverlight to Java calls in REST style,&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.eclipse4sl.org/blog/interoperability/interoperability-guidance-silverlight-with-jax-wscxf/" mce_href="http://www.eclipse4sl.org/blog/interoperability/interoperability-guidance-silverlight-with-jax-wscxf/"&gt;SOAP guidance&lt;/A&gt; : JAX-WS implementation from &lt;A href="http://cxf.apache.org/" mce_href="http://cxf.apache.org/"&gt;Apache (CXF)&lt;/A&gt; was chosen to illustrate the Silverlight to Java calls in SOAP style.&lt;/LI&gt;&lt;/UL&gt;
&lt;H3&gt;Start building Silverlight RIA in eclipse today !&lt;/H3&gt;
&lt;P&gt;With Eclipse4SL M2 plus the guidance to connect Java business logic, you can now build Silverlight applications in what we call the &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/10/16/eclipse4sl-architecture-series-pure-or-mixed-eclipse.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/10/16/eclipse4sl-architecture-series-pure-or-mixed-eclipse.aspx"&gt;Pure Eclipse configuration&lt;/A&gt; or you may complement your design by using Expression Blend, and collaborate with .Net teams using Visual Studio. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_2.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-LEFT: 0px; MARGIN-RIGHT: auto; BORDER-BOTTOM: 0px" height=207 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_thumb.png" width=240 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HappynewyearEclipse4SLM2andRESTandSOAPGu_139D7/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If the XAML experience is now completed, it is fair to say that the C# development experience is still rudimentary (no code assist and no debug). Therefore, in real world, you’ll still need Visual Studio for the Silverlight C# code development and debug tasks (Hopefully, Visual Studio Web Express is free). &lt;/P&gt;
&lt;P&gt;Improving the C# experience as well as supporting other dev platforms is&amp;nbsp; still on the &lt;A href="http://www.eclipse4sl.org/#roadmap" mce_href="http://www.eclipse4sl.org/#roadmap"&gt;Eclipse4SL roadmap&lt;/A&gt;… stay tuned…&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to support this project, feel free to &lt;A href="http://www.eclipse4sl.org/" mce_href="http://www.eclipse4sl.org/"&gt;vote on EPIC&lt;/A&gt;, but also&amp;nbsp; &lt;A href="http://www.eclipse4sl.org/community/" mce_href="http://www.eclipse4sl.org/community/"&gt;contact the Eclipse4Sl Team&lt;/A&gt; if you want to appear among the &lt;A href="http://www.eclipse.org/proposals/sldt/" mce_href="http://www.eclipse.org/proposals/sldt/"&gt;SLDT proposal interested parties&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9306359" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Interoperability/default.aspx">Interoperability</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/eclipse4SL/default.aspx">eclipse4SL</category></item><item><title>How-To : Silverlight accessing Java REST services (Part 2 – No Cross Domain : Tomcat/Eclipse)</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/08/06/how_2D00_to-silverlight-accessing-java-rest-services-part-2-no-cross-domain-tomcat.aspx</link><pubDate>Wed, 06 Aug 2008 11:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8791751</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8791751.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8791751</wfw:commentRss><description>&lt;P mce_keep="true"&gt;The &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/tags/How-to/default.aspx"&gt;HowTo&lt;/A&gt; serie demoes Silverlight accessing Web Services in various configuration. In this post, we will demonstrate a REST service consumed by a Silverlight client application where the Site of Origin hosts the Web Services. This scenario is categorized as a &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx"&gt;&lt;STRONG&gt;D2D scenario&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt; &lt;EM&gt;without&lt;/EM&gt; cross-domain policy&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;The XAP package, the REST service Eclipse project and the Silverlight Eclipse project are available as an attachment to this post.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Technical Environment&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;REST services are built with the Restlet framework and hosted in Tomcat &lt;/LI&gt;
&lt;LI&gt;The Silverlight application is also hosted in Tomcat&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_2.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=308 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb.png" width=411 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because the Site Of Origin and the Web Services reside in the same host, no Cross Domain policy is required.&lt;/P&gt;
&lt;P&gt;To successfully install the technical environment, please take the following step :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Build the scenario detailled in &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/29/silverlight-plus-xml-rest-style-in-cross-domain-access.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/29/silverlight-plus-xml-rest-style-in-cross-domain-access.aspx"&gt;HowTo : Silverlight accessing Java REST services (Part 1 - Cross Domain : IIS + Tomcat)&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you don’t feel like doing the previous step, the XAP package available as an attachment contains a Silverlight client which is configured to access a REST service at http://localhost:8080/Restlet-servletfirstResource/items.&lt;/P&gt;
&lt;P&gt;The REST service is also available as an attachment to this post allows to do a GET and POST method to get a list of items or to insert a new one.&lt;/P&gt;
&lt;P&gt;Download the attachment and unzip it. There are two needed parts : the Silverlight XAP package and the Restlet Eclipse project.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_4.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Host the REST service with Tomcat&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Import the Reslet-servletfirstResource project into your Eclipse workspace : &lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;go to File –&amp;gt; Import &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_6.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=243 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_2.png" width=146 border=0&gt;&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Then chose General—&amp;gt;Existing Projects into Workspace &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_10.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=270 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_4.png" width=231 border=0&gt;&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Select the root directory, Browse to the Restlet-servletfirstResource folder, then click on Finish. The Restlet-servletfirstResource has now been imported into your workspace &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_14.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=268 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_6.png" width=229 border=0&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Run the project on Tomcat Server. check that &lt;A title=http://localhost:8080/Restlet-servletfirstResource/items href="http://localhost:8080/Restlet-servletfirstResource/items"&gt;http://localhost:8080/Restlet-servletfirstResource/items&lt;/A&gt; is accessible you should get the following result : &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_16.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=196 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_7.png" width=240 border=0&gt;&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Host the Silverlight application in an Eclipse project running on Tomcat&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a new Dynamic Web Project&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Press Ctrl+n to go to the New Wizard Project, under Web select Dynamic Web Project. &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_18.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=239 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_8.png" width=240 border=0&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;Call it REST-SilverlightClient and ensure that the Target Runtime is set to Apache Tomcat 6.0 &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_20.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=240 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_9.png" width=205 border=0&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;If Eclipse prompts you to switch to J2EE perspective, accept it.&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;In the REST-SilverlightClient project, create the WebContent\ClientBin folder and copy the XAP package into it.&lt;/LI&gt;
&lt;LI&gt;Now we need to host it through an Active X control :&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Right click on WebContent folder and select New—&amp;gt;JSP, call it index&lt;/LI&gt;
&lt;LI&gt;Edit index.jsp, in the Head part put the following script that catches Silverlight Error.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt; &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;script&lt;/SPAN&gt; &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text/javascript"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;     &lt;SPAN class=kwrd&gt;function&lt;/SPAN&gt; onSilverlightError(sender, args) {&lt;/PRE&gt;&lt;PRE class=alt&gt;     &lt;/PRE&gt;&lt;PRE&gt;         &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; appSource = &lt;SPAN class=str&gt;""&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE class=alt&gt;         &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (sender != &lt;SPAN class=kwrd&gt;null&lt;/SPAN&gt; &amp;amp;&amp;amp; sender != 0) {&lt;/PRE&gt;&lt;PRE&gt;             appSource = sender.getHost().Source;&lt;/PRE&gt;&lt;PRE class=alt&gt;         } &lt;/PRE&gt;&lt;PRE&gt;         &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; errorType = args.ErrorType;&lt;/PRE&gt;&lt;PRE class=alt&gt;         &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; iErrorCode = args.ErrorCode;&lt;/PRE&gt;&lt;PRE&gt;         &lt;/PRE&gt;&lt;PRE class=alt&gt;         &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; errMsg = &lt;SPAN class=str&gt;"Unhandled Error in Silverlight 2 Application "&lt;/SPAN&gt; +  appSource + &lt;SPAN class=str&gt;"\n"&lt;/SPAN&gt; ;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;         errMsg += &lt;SPAN class=str&gt;"Code: "&lt;/SPAN&gt;+ iErrorCode + &lt;SPAN class=str&gt;"    \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;         errMsg += &lt;SPAN class=str&gt;"Category: "&lt;/SPAN&gt; + errorType + &lt;SPAN class=str&gt;"       \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE class=alt&gt;         errMsg += &lt;SPAN class=str&gt;"Message: "&lt;/SPAN&gt; + args.ErrorMessage + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;         &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (errorType == &lt;SPAN class=str&gt;"ParserError"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;         {&lt;/PRE&gt;&lt;PRE class=alt&gt;             errMsg += &lt;SPAN class=str&gt;"File: "&lt;/SPAN&gt; + args.xamlFile + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;             errMsg += &lt;SPAN class=str&gt;"Line: "&lt;/SPAN&gt; + args.lineNumber + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE class=alt&gt;             errMsg += &lt;SPAN class=str&gt;"Position: "&lt;/SPAN&gt; + args.charPosition + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;         }&lt;/PRE&gt;&lt;PRE class=alt&gt;         &lt;SPAN class=kwrd&gt;else&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (errorType == &lt;SPAN class=str&gt;"RuntimeError"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;         {           &lt;/PRE&gt;&lt;PRE class=alt&gt;             &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (args.lineNumber != 0)&lt;/PRE&gt;&lt;PRE&gt;             {&lt;/PRE&gt;&lt;PRE class=alt&gt;                 errMsg += &lt;SPAN class=str&gt;"Line: "&lt;/SPAN&gt; + args.lineNumber + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;                 errMsg += &lt;SPAN class=str&gt;"Position: "&lt;/SPAN&gt; +  args.charPosition + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE class=alt&gt;             }&lt;/PRE&gt;&lt;PRE&gt;             errMsg += &lt;SPAN class=str&gt;"MethodName: "&lt;/SPAN&gt; + args.methodName + &lt;SPAN class=str&gt;"     \n"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE class=alt&gt;         }&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;         &lt;SPAN class=kwrd&gt;throw&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Error(errMsg);&lt;/PRE&gt;&lt;PRE&gt;     }&lt;/PRE&gt;&lt;PRE class=alt&gt; &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;script&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;In the Body part, instantiate a Silverlight control by adding the following HTML code, ensure that the param named “source” has is value set to the XAP package URI relative to index.jsp Web Page:&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;DIV class=csharpcode&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="silverlightControlHost"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;object&lt;/SPAN&gt; &lt;SPAN class=attr&gt;data&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="data:application/x-silverlight,"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE class=alt&gt;            &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="application/x-silverlight-2-b2"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE&gt;            &lt;SPAN class=attr&gt;width&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="100%"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;height&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="100%"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;        &lt;/PRE&gt;&lt;PRE&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;param&lt;/SPAN&gt;     &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="source"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;value&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ClientBin/REST-JavaServiceItem.xap"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;        &lt;/PRE&gt;&lt;PRE class=alt&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;param&lt;/SPAN&gt;     &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="onerror"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;value&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="onSilverlightError"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;param&lt;/SPAN&gt;     &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="background"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;value&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="white"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;    &lt;/PRE&gt;&lt;PRE&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;     &lt;SPAN class=attr&gt;href&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://go.microsoft.com/fwlink/?LinkID=115261"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE class=alt&gt;            &lt;SPAN class=attr&gt;style&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text-decoration: none;"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;               &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;img&lt;/SPAN&gt; &lt;SPAN class=attr&gt;src&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://go.microsoft.com/fwlink/?LinkId=108181"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE class=alt&gt;                 &lt;SPAN class=attr&gt;alt&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Get Microsoft Silverlight"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE&gt;                 &lt;SPAN class=attr&gt;style&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="border-style: none"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;object&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;iframe&lt;/SPAN&gt; &lt;SPAN class=attr&gt;style&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='visibility:hidden;height:0;width:0;border:0px'&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;iframe&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;
&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;UL&gt;
&lt;LI&gt;Run the project on Tomcat Server and the Silverlight control will appear in the Eclipse Web Browser : &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_22.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=216 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/HowToSilverlightaccessingJavaRESTservice_F1AE/image_thumb_10.png" width=240 border=0&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The great thing about that is that you will be able to test your REST Service and the Silverlight application without running multiple Development Environments.&lt;/P&gt;
&lt;P&gt;- &lt;A class="" href="http://www.linkedin.com/in/ronnykwon" target=_blank mce_href="http://www.linkedin.com/in/ronnykwon"&gt;Ronny Kwon&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8791751" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/silverlight_plus_java/attachment/8791751.ashx" length="145518" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Implementation/default.aspx">Implementation</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/How-to/default.aspx">How-to</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/D2D/default.aspx">D2D</category></item><item><title>B2C scenario : Customer Environement</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2c-scenario-customer-environment.aspx</link><pubDate>Thu, 31 Jul 2008 17:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8793404</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8793404.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8793404</wfw:commentRss><description>&lt;P mce_keep="true"&gt;The B2C scenario corresponds to &lt;STRONG&gt;Web applications accessed by customers&lt;/STRONG&gt;, traditionnaly built with some dynamic HTML/AJAX technology running on the server side, that &lt;STRONG&gt;have been elected to leverage the Silverlight capabilities&lt;/STRONG&gt; (enriched user experience, vector based contents, scaling, rich media…).To comply with the scope of this blog, we’ll concentrate on RIA scenarios, where the customer accesses private data from a Silverlight Client.&lt;/P&gt;
&lt;P&gt;As listed in &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx"&gt;Silverlight scenarios for Rich Internet Applications&lt;/A&gt;, the following constraints apply to the Customer Environment scenario :&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Infrastructure security is mandatory : it includes &lt;STRONG&gt;a DMZ&lt;/STRONG&gt; to protect the Web Server and access to the Web Services &lt;STRONG&gt;and optional SSL/HTTPS communications &lt;/STRONG&gt;depending on the confidentiality of the data accessed. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Protocol adaptation is required if&lt;/STRONG&gt; the application is interfaced with pre-existing Web Services that cannot be immediatly consumed by Silverlight. This extract work is performed by a mediation layer, materialized in the schema below by the &lt;STRONG&gt;Services Gateway. Moreover&lt;/STRONG&gt;, the Services Gateway in the Customer scenario &lt;STRONG&gt;can enforce the alignement of the incoming messages&lt;/STRONG&gt; with the entreprise governance policies. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Authentication &amp;amp; authorization is required&lt;/STRONG&gt; for Line of Business Applications to secure read and write access to Entreprise Data. &lt;STRONG&gt;Form based&lt;/STRONG&gt; authentication would be the preferred way in this scenario. If you need Claim based authentication, take a look at the &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx"&gt;B2B&lt;/A&gt; scenario. &lt;/LI&gt;
&lt;LI&gt;A cross domain security file is required to access the Services Gateway&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_4.png"&gt;&lt;IMG title=image height=239 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_thumb_1.png" width=347 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_thumb_1.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We plan to document this scenario by extending the “B2E with mediation” scenario, with Form Based Authentication &amp;amp; Authorization constraints. If you have technical requirements not list here, there’s good chance the B2C scenario can be enriched from the B2B scenario.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8793404" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Interoperability/default.aspx">Interoperability</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Cross+Domain/default.aspx">Cross Domain</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2C/default.aspx">B2C</category></item><item><title>B2B scenario : Partner Environment</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx</link><pubDate>Thu, 31 Jul 2008 13:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8793123</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8793123.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8793123</wfw:commentRss><description>&lt;P&gt;The B2B scenario corresponds to Enterprise Web Services exposed to a partner through a Rich Client application, traditionnaly built with some dynamic HTML/AJAX technology running on the server side, that &lt;STRONG&gt;have been elected to leverage the Silverlight capabilities&lt;/STRONG&gt; (enriched user experience, vector based contents, scaling, rich media…).&lt;/P&gt;
&lt;P&gt;As listed in &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx"&gt;Silverlight scenarios for Rich Internet Applications&lt;/A&gt;, the following constraints apply to the Partner Environment scenario :&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Infrastructure security is mandatory : it includes &lt;STRONG&gt;a DMZ&lt;/STRONG&gt; to protect the Web Server and access to the Web Services &lt;STRONG&gt;and SSL/HTTPS communications &lt;/STRONG&gt;to protect the confidential data owned by your enterprise and shared with your partner. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Protocol adaptation is required if&lt;/STRONG&gt; the application is interfaced with pre-existing Web Services that cannot be immediatly consumed by Silverlight. This extract work is performed by a mediation layer, materialized in the schema below by the &lt;STRONG&gt;Services Gateway. Moreover&lt;/STRONG&gt;, the Services Gateway in the Customer scenario &lt;STRONG&gt;can enforce the alignement of the incoming messages&lt;/STRONG&gt; with the entreprise governance policies. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Authentication &amp;amp; authorization is required&lt;/STRONG&gt; to secure read and write access to Entreprise Data. &lt;STRONG&gt;Claim based&lt;/STRONG&gt; authentication would be the preferred way in this scenario. If you want wish to use Form based authentication, have a look at the &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2c-scenario-customer-environment.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2c-scenario-customer-environment.aspx"&gt;B2C&lt;/A&gt; scenario. &lt;/LI&gt;
&lt;LI&gt;A cross domain security file is required to access the Services Gateway if not host on the Site of Origin.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_2.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=263 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_thumb.png" width=383 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2BscenarioPartnerEnv_A878/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We plan to document this scenario by extending the “B2E with mediation” scenario with a Services Gateway (such as &lt;A href="http://www.codeplex.com/servicesengine" mce_href="http://www.codeplex.com/servicesengine"&gt;Managed Services Engine&lt;/A&gt;)&amp;nbsp; and SSL/HTTPS.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8793123" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Interoperability/default.aspx">Interoperability</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Cross+Domain/default.aspx">Cross Domain</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2B/default.aspx">B2B</category></item><item><title>B2E scenario : Intranet Environment</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2e-scenario-intranet-environment.aspx</link><pubDate>Thu, 31 Jul 2008 12:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8793070</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8793070.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8793070</wfw:commentRss><description>&lt;P&gt;The B2E scenario corresponds to &lt;STRONG&gt;internal Web applications&lt;/STRONG&gt;, traditionnaly built with some dynamic HTML/AJAX technology running on the server side, that &lt;STRONG&gt;have been elected to leverage the Silverlight capabilities&lt;/STRONG&gt; (enriched user experience, vector based contents, scaling, rich media…).&lt;/P&gt;
&lt;P&gt;As listed in &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx"&gt;Silverlight scenarios for Rich Internet Applications&lt;/A&gt;, the following constraints apply to the Intranet Environment scenario :&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Infrastructure security is optional as we are in a IT governed environment,&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Protocol adaptation is required if the application is interfaced with pre-existing Web Services&lt;/STRONG&gt; that cannot be immediatly consumed by Silverlight. This extract work is performed by a mediation layer, materialized in the schema below by the &lt;STRONG&gt;Services Gateway&lt;/STRONG&gt; .&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Authentication &amp;amp; authorization is required&lt;/STRONG&gt; for Line of Business Applications to secure read and write access to Entreprise Data. &lt;STRONG&gt;Windows integrated authentication&lt;/STRONG&gt; would be the preferred way for an intranet scenario. If you want wish to use Form or Claim based authentication, take a look at the &lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx"&gt;B2B&lt;/A&gt; and &lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2c-scenario-customer-environment.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2c-scenario-customer-environment.aspx"&gt;B2C&lt;/A&gt; scenarios.&lt;/LI&gt;
&lt;LI&gt;A cross domain security file is needed&amp;nbsp;if the Services Gateway&amp;nbsp;is implemented or&amp;nbsp;if the Site Of Origin does not host the Web Services (as in interoperability scenarios where the Site of Origin and the Web Services rely on two different technologies).&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_2.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=202 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_thumb.png" width=278 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_thumb.png"&gt;&lt;/A&gt; &lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_4.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=203 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_thumb_1.png" width=283 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/B2EScenarioIntranetEnvironment_9397/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We plan to experiment SOAP/RPC and XML/REST configuration in Full Windows, Full Java and Mixt environment. &lt;/P&gt;
&lt;P&gt;We’ll also demonstrate how Web Services invoked from Silverlight can leverage the Authentication &amp;amp; Authentication facilities provided by IIS/ASP.NET through interoperabiliy.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8793070" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Interoperability/default.aspx">Interoperability</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Cross+Domain/default.aspx">Cross Domain</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2E/default.aspx">B2E</category></item><item><title>How-To : Silverlight accessing Java REST services (Part 1 - Cross Domain : IIS + Tomcat)</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/How_2D00_To-_3A00_-Silverlight-accessing-Java-REST-services-_2800_Part-1-_2D00_-Cross-Domain-_3A00_-IIS-_2B00_-Tomcat_2900_.aspx</link><pubDate>Wed, 30 Jul 2008 15:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8789161</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8789161.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8789161</wfw:commentRss><description>&lt;P mce_keep="true"&gt;The &lt;A class="" href="http://www.linkedin.com/in/ronnykwon" target=_blank mce_href="http://www.linkedin.com/in/ronnykwon"&gt;HowTo&lt;/A&gt; serie demoes Silverlight accessing Web Services in various configurations. In this post, we will demonstrate a REST service consumed by HTTP GET and POST requests issued from a Silverlight client application. This scenario can be categorized as a &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx"&gt;D2D scenario&lt;/A&gt; with a cross domain policy. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;The Silverlight example described below is available as an attachment to this post.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Technical environment&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;REST services are built with Restlet and hosted in Tomcat&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;The Silverlight application is hosted under the Visual Studio embedded Web Server code name "Catalina" (which delivers a subset of the IIS capabilities)&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/MixJavaand.NETEnvironment_DFA6/image_2.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=387 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/MixJavaand.NETEnvironment_DFA6/image_thumb.png" width=505 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Because the Site of Origin and the Web Services reside in different hosts, a Cross Domain policy is required at the Services host’s root (/clientaccesspolicy.xml"&amp;gt;http://&amp;lt;serviceshostname:port&amp;gt;/clientaccesspolicy.xml)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Implementation of the REST service&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To get an overview of the Restlet framework, complete the tutorials : &lt;A class="" href="http://www.restlet.org/documentation/1.0/firstSteps" target=_blank mce_href="http://www.restlet.org/documentation/1.0/firstSteps "&gt;First Steps&lt;/A&gt; and &lt;A class="" href="http://www.restlet.org/documentation/1.0/firstResource" target=_blank mce_href="http://www.restlet.org/documentation/1.0/firstResource"&gt;First Resource&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Service development with Restlet can be summarized as follow : &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The Application class is the entry point to the Restlet service. It&amp;nbsp; binds a URI to a specific Resource. &lt;/LI&gt;
&lt;LI&gt;The Resource class describes how the service behaves on a specific URI invokation. &lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;After completing the tutorials above, deploy the firstResource service as a &lt;A class="" href="http://www.restlet.org/documentation/1.0/firstSteps#part03" target=_blank mce_href="http://www.restlet.org/documentation/1.0/firstSteps#part03"&gt;Servlet hosted by Tomcat&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Invoke the Restlet service with the URI &lt;A href="http://localhost:8080/Restlet-servletfirstResource/items"&gt;http://localhost:8080/Restlet-servletfirstResource/items&lt;/A&gt;. Assuming that Tomcat is running on port 8080 and that your Restlet project name is Restlet-servletfirstResource, you get the following response :&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;  &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN class=html&gt;xml&lt;/SPAN&gt; &lt;SPAN class=attr&gt;version&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="1.0"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;encoding&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="UTF-8"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;standalone&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="no"&lt;/SPAN&gt; ?&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;  &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;items&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;     &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;item&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;        &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;item1&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;        &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;description&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;description of item1&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;description&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;     &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;item&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;   &lt;FONT color=#000000&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;items&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Enabling Cross Domain Access&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Since the REST service and the Silverlight application are hosted in different hosts, we need to overpass the &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/Cross-Domain-_3A00_-Trouble-while-accessing-Web-Services.aspx" target=_blank&gt;Cross Domain Issue&lt;/A&gt;. Create at the root of the REST service host, a clientaccesspolicy.xml file with the following content :&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN class=html&gt;xml&lt;/SPAN&gt; &lt;SPAN class=attr&gt;version&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="1.0"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;encoding&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="UTF-8"&lt;/SPAN&gt;?&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;access-policy&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;cross-domain-access&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;policy&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;allow-from&lt;/SPAN&gt; &lt;SPAN class=attr&gt;http-request-headers&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="*"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;                &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;domain&lt;/SPAN&gt; &lt;SPAN class=attr&gt;uri&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="*"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;allow-from&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;grant-to&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;                &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;resource&lt;/SPAN&gt; &lt;SPAN class=attr&gt;include-subpaths&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="true"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="/"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;grant-to&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;policy&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;cross-domain-access&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;access-policy&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Consuming a REST service with Silverlight (GET method)&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We chose the WebClient API to request the REST service, and LINQ to process the XML response. &lt;A class="" href="http://msdn.microsoft.com/en-us/library/cc188996(VS.95).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/cc188996(VS.95).aspx"&gt;XmlReader&lt;/A&gt; is another parsing option, and &lt;A class="" href="http://www.linkedin.com/in/ronnykwon" target=_blank mce_href="http://www.linkedin.com/in/ronnykwon"&gt;Serialization&lt;/A&gt; (Xml or DataContract) is another one.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Invocation of the REST service&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;First of all, in your UserControl, declare a MyItem class that will map the XML response elements.&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;class&lt;/SPAN&gt; MyItem&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; myName { get; set; }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; myDescription { get; set; }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;DIV class=csharpcode&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;&lt;SPAN class=rem&gt;// List of Items&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;IEnumerable&amp;lt;MyItem&amp;gt; Items = &lt;SPAN class=kwrd&gt;null&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;Now, let's send a HTTP GET method request to /items URI so we can retrieve every items&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; getAction()&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;    WebClient webclient = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; WebClient();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;    webclient.DownloadStringCompleted += &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; DownloadStringCompletedEventHandler(client_DownloadStringCompleted);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;    webclient.DownloadStringAsync(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(&lt;SPAN class=str&gt;"http://localhost:8080/Restlet-servletfirstResource/items"&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&lt;U&gt;Processing the XML results&lt;/U&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Let’s process the results using LINQ support for XML :&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; client_DownloadStringCompleted(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, DownloadStringCompletedEventArgs e)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (e.Error == &lt;SPAN class=kwrd&gt;null&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;    {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;        XDocument xmlItems = XDocument.Parse(e.Result);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;// use LINQ to XML to parse the response&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;        Items = from child &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; xmlItems.Element(&lt;SPAN class=str&gt;"items"&lt;/SPAN&gt;).Descendants().ToList()&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;                &lt;SPAN class=rem&gt;// restrict the selection to item children&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;                &lt;SPAN class=kwrd&gt;where&lt;/SPAN&gt; child.Name.LocalName==&lt;SPAN class=str&gt;"item"&lt;/SPAN&gt;    &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;                select &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; MyItem&lt;/PRE&gt;&lt;PRE class=alt&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;                        myName = (&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;)child.Element(&lt;SPAN class=str&gt;"name"&lt;/SPAN&gt;),&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  13:  &lt;/SPAN&gt;                        myDescription = (&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;) child.Element(&lt;SPAN class=str&gt;"description"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  14:  &lt;/SPAN&gt;                    };&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  15:  &lt;/SPAN&gt;    } &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  16:  &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;&lt;STRONG&gt;Sending Data to a REST service with Silverlight&amp;nbsp; (POST method)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Use the WebClient to send a HTTP POST request to the /items URI, by adding two parameters : name = "Foo"&amp;nbsp; and description = "Bar" :&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; postWebClient()&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;    WebClient webclient = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; WebClient();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;    webclient.UploadStringAsync(&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;      &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(&lt;SPAN class=str&gt;"http://localhost:8080/Restlet-servletfirstResource/items"&lt;/SPAN&gt;),&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;      &lt;SPAN class=str&gt;"name=Foo&amp;amp;description=Bar"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;    );&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Warning : Notice that if you try to hit the same URI several time with the HTTP GET method, the results do not get refreshed but remain the same. Further explanations about this &lt;/EM&gt;&lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/Limitations-when-accessing-REST-services-from-Silverlight.aspx#CacheIssue" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/Limitations-when-accessing-REST-services-from-Silverlight.aspx#CacheIssue"&gt;&lt;EM&gt;caching issue&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; are available here.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- &lt;A class="" href="http://www.linkedin.com/in/ronnykwon" target=_blank mce_href="http://www.linkedin.com/in/ronnykwon"&gt;Ronny Kwon&lt;/A&gt; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8789161" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/silverlight_plus_java/attachment/8789161.ashx" length="822159" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Implementation/default.aspx">Implementation</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/How-to/default.aspx">How-to</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Cross+Domain/default.aspx">Cross Domain</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/D2D/default.aspx">D2D</category></item><item><title>Limitations when accessing REST services from Silverlight</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/Limitations-when-accessing-REST-services-from-Silverlight.aspx</link><pubDate>Wed, 30 Jul 2008 12:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8784217</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8784217.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8784217</wfw:commentRss><description>&lt;P&gt;As explained in &lt;A id=bp___v___r___postlist___EntryItems_ctl01_PostTitle href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/what-are-those-soap-rpc-and-xml-rest-styles.aspx"&gt;&lt;FONT color=#176db5&gt;What are those SOAP/RPC and XML/REST styles ?&lt;/FONT&gt;&lt;/A&gt;, the REST support in Silverlight has several limitations : &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Only the&amp;nbsp;"Content-Type" HTTP header can be accessed from the Silverlight client code. &lt;/LI&gt;
&lt;LI&gt;The WebClient&amp;nbsp;works fine in most scenarios, yet turn to HttpWebRequest if you need to control the response flow.&lt;/LI&gt;
&lt;LI&gt;HTTP methods are limited to POST and GET (no PUT, nor DELETE support) - see below&lt;/LI&gt;
&lt;LI&gt;You may encounter Browser Caching issues - see below&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;U&gt;1. Manipulating a REST service model is done via 4 basic HTTP methods: GET, POST, PUT, DELETE . The last two methods&amp;nbsp;are not yet supported by Silverlight&amp;nbsp;:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ConsiderationsbeforecallingaRESTfulservi_D459/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ConsiderationsbeforecallingaRESTfulservi_D459/image_2.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=242 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ConsiderationsbeforecallingaRESTfulservi_D459/image_thumb.png" width=564 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ConsiderationsbeforecallingaRESTfulservi_D459/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;A class="" title=#CacheIssue name=#CacheIssue&gt;&lt;/A&gt;
&lt;P&gt;&lt;U&gt;&lt;A class="" title=CacheIssue name=CacheIssue&gt;&lt;/A&gt;2. Cache issue&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;You request&amp;nbsp;data from a REST service by invoking a URI&amp;nbsp;with the WebClient&amp;nbsp;class. As all service communications are async in Silverlight, you process the result through an handler.&lt;/P&gt;
&lt;DIV class=csharpcode&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;WebClient client = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; WebClient();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;client.DownloadStringCompleted += &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; DownloadStringCompletedEventHandler(client_DownloadStringCompleted);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;client.DownloadStringAsync(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(“http://foo.org/service/items”));&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.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 {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;
&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;You may experience that the same data gets always retrieved, even when modified on the service side. To solve this problem :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;either set the Cache Control&amp;nbsp;with "no-cache" value on the service side, &amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;or ensure that subsequent calls are made&amp;nbsp;with&amp;nbsp;differents URI (so that the results do not get cached). This is mandatory if the REST framework on the service side does not support cache header customization, as it is the case for the Restlet framework (as of July 2008, &lt;A class="" href="http://restlet.tigris.org/issues/show_bug.cgi?id=25" target=_blank mce_href="http://restlet.tigris.org/issues/show_bug.cgi?id=25"&gt;Jerome Louvel is working on it&lt;/A&gt;).&lt;/LI&gt;&lt;/UL&gt;&lt;PRE class=csharpcode&gt;client.DownloadStringAsync(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(“http://foo.org/service/items?cache=" + DateTime.Now));&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt; &amp;nbsp;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;- &lt;A class="" href="http://www.linkedin.com/in/ronnykwon" target=_blank mce_href="http://www.linkedin.com/in/ronnykwon"&gt;Ronny Kwon&lt;/A&gt;&lt;/PRE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8784217" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Implementation/default.aspx">Implementation</category></item><item><title>What are those SOAP/RPC and XML/REST styles ?</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/what-are-those-soap-rpc-and-xml-rest-styles.aspx</link><pubDate>Wed, 30 Jul 2008 10:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8791184</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8791184.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8791184</wfw:commentRss><description>&lt;P&gt;In the Silverlight world, the sole protocol you need to care about is the HTTP protocol. Yet, you can take 2 directions to send and retreive messages from a Silverlight Rich Client application. &lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;SOAP/RPC style&lt;/STRONG&gt; leverages the SOAP specifications and the Remote Procedure Call paradigm (ie, a request message is composed of an operation + arguments, and the response corresponds to a structure of data. Both request and response are formatted in XML in a SOAP enveloppe which enriches the communcation). &lt;/P&gt;
&lt;P&gt;On the client side, the SOAP/RPC style is implemented by a subset of the .Net Windows Communication Foundation framework. The basicHttpBinding is the unique supported binding in Silverlight 2 beta 2, and several restrictions apply : SOAP 1.1 only, no WS-Adressing, no WS-* specification. Why those restrictions ? because we want to keep the Silverlight runtime as light as possible (a standard .Net full WCF runtime is about 11 Mo !).&lt;/P&gt;
&lt;P&gt;On the server side, you're free to use any SOAP framework and technology as this is a promise of the Services paradigm ... as long as you conform to the restrictions brought by the Silverlight client (see above), otherwise, your Silverlight client will never get a chance to consume your data. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;For the scope of the implementations detailled on this blog, we chose server side frameworks that we thought were dominant in their respective community, even if we do not have precise measure about it. Moreover, we wanted free frameworks to allow anybody to replay the samples.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Windows : the &lt;STRONG&gt;WCF framework&lt;/STRONG&gt; which comes with .Net 3.5. The 3.5 version gives us nice SOAP and REST capabilities + the Stream support which enables us to service client access policy file directly from WCF (no HTTP server needed).&lt;/LI&gt;
&lt;LI&gt;Java : the &lt;STRONG&gt;JAX-WS Reference Implementation from Sun&lt;/STRONG&gt; that comes with Java version 6. We have worked a year ago about the &lt;A href="http://www.microsoft.com/france/interop/themes/applications/20070627-services-web-NET-Java/default.mspx" mce_href="http://www.microsoft.com/france/interop/themes/applications/20070627-services-web-NET-Java/default.mspx"&gt;compatibility issues between WCF and JAX-WS&lt;/A&gt;, thus we feel rather comfortable with it. JAX-WS may be hosted in any Application Server. Again, we choose a free and popular one : Tomcat, from the &lt;A href="http://port25.technet.com/archive/2008/07/25/oscon2008.aspx" mce_href="http://port25.technet.com/archive/2008/07/25/oscon2008.aspx"&gt;Apache foundation which Microsoft came to sponsor&lt;/A&gt; during the course of our experimentations (welcome Apache, bring us great support and performance for the Windows platform)&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;By &lt;STRONG&gt;XML/REST style&lt;/STRONG&gt;, we mean the retrieval of an XML formatted message in the REST philosophy, where the operation paradigm is replaced by a resource paradigm so that retrieving data maps to a resource invocation through the couple (HTTP ORDER + URI). For example, "HTTP GET /clients/name" or "HTTP POST /clients [XML data coresponding to a new client] . The format of the response can be of any kind, it is declared in the "Content-Type" HTTP header. For the scope of this blog which is RIA oriented, we'll stick to XML as we are focusing on fetching and updating Data (we could have also used JSON but XML is a preferred way for Rich Internet Applications because if its schema / typing capability).&lt;/P&gt;
&lt;P&gt;On the client side, the XML/REST style requires the capability to invoke HTTP commands, and getting the results in Async mode to ensure the User Interface remains responsive (ie, UI does not get stuck by network or service latencies. For your information the SOAP/RPC style is also implemented on the client side with an Async pattern, behind the scene). &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;If you are a Restafarian, you are wondering how much of your REST programing skills you can leverage with Silverlight ? Well, Silverlight 2 Beta 2 restricts to the GET and POST commands of the HTTP protocol. Moreover, you can not control the set of HTTP headers you can transmit to your RESTful service : the sole HTTP header you can modify in beta 2 is the Content-Type.&lt;/P&gt;
&lt;P&gt;From an implementation point of view, Silverlight 2 beta 2 provides two programmatic interfaces : WebClient and HttpWebRequest. Which one should you use ? The &lt;A href="http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx#WebClient_and_HttpWebRequest" mce_href="http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx#WebClient_and_HttpWebRequest"&gt;SL2beta2 breaking changes&lt;/A&gt; brings the answer. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;"&lt;EM&gt;The updated WebClient API provides a much fuller featured WebClient. This changes the guidance around which networking APIs to use: &lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;EM&gt;WebClient: Use this class when you want an easy to use, event-based API. &lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;EM&gt;HttpWebRequest: Use this class when you want a delegate based model and/or the ability to progressively read the response stream. "&lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;To learn more about pratical issues with XML/REST style invocations, read "&lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/Limitations-when-accessing-REST-services-from-Silverlight.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/Limitations-when-accessing-REST-services-from-Silverlight.aspx"&gt;Limitations when accessing REST services from Silverlight&lt;/A&gt;" by Ronny.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;On the server side, all we need is a REST style compliant framework. The Windows and Java communities provide us with several options :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Microsoft delivers WCF and "Astoria, aka &lt;A href="http://astoria.mslivelabs.com/" mce_href="http://astoria.mslivelabs.com/"&gt;ADO.NET Data Services&lt;/A&gt;". The latter proposes a great &lt;A href="http://blogs.msdn.com/astoriateam/archive/2008/04/24/using-rest-services-in-silverlight.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2008/04/24/using-rest-services-in-silverlight.aspx"&gt;support for Silverlight 2&lt;/A&gt; but that is out of the scope of this blog... therefore, we turned to &lt;STRONG&gt;WCF REST capabilities&lt;/STRONG&gt; which come with .Net 3.5.&lt;/LI&gt;
&lt;LI&gt;Among the Java REST initiative, we had a look at the SUN versus opensouce alternative. It turned out that &lt;STRONG&gt;the Reslet framework&lt;/STRONG&gt; developped by &lt;A href="http://www.restlet.org/" mce_href="http://www.restlet.org/"&gt;Jerome Louvel&lt;/A&gt; provides a great REST experience with a unique French flavor. Special thanks to &lt;A href="http://blogpro.toutantic.net/" mce_href="http://blogpro.toutantic.net/"&gt;Aurelien Pelletier&lt;/A&gt; for making us aware of this technology.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8791184" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>D2D scenario : Developer Environment</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx</link><pubDate>Mon, 28 Jul 2008 17:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8784339</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8784339.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8784339</wfw:commentRss><description>&lt;p&gt;This scenario is typically used in development phase when &lt;strong&gt;you are building a Silverlight rich client that connects to new business Logic&lt;/strong&gt;. It is mandatory that the business logic is new to ensure you have enough control to enforce a configuration where the Site Of Origin and the Services Host reside on the same node. If you face a configuration where you need to interface with Business Logic exposed by existing Web Services from a distinct node or requiring protocol adaptation, turn to the B2E scenario.&lt;/p&gt;  &lt;p&gt;As listed in &lt;a id="bp___v___r___postlist___EntryItems_ctl02_PostTitle" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx"&gt;&lt;font color="#176db5"&gt;Silverlight scenarios for Rich Internet Applications&lt;/font&gt;&lt;/a&gt;, the following constraints apply to the Developer Environment scenario :&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;No infrastructure security constraints since this is a dev/test env (No HTTPS, no DMZ) &lt;/li&gt;    &lt;li&gt;No protocol adaptation is necessary as we develop brand new services here (ie, messages format &amp;amp; exchange protocol correspond to the Silverlight client capabilities, they can be directly consumed) &lt;/li&gt;    &lt;li&gt;Authentication &amp;amp; authorization may need to be handled if required at production/deployment time : this point is covered in the B2E scenario. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;A cross domain security file is needed if the Site Of Origin does not host the Web Services&lt;/strong&gt;, as in interoperability scenarios where the Site of Origin and the Web Services rely on two different technologies.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/D2DScenarioDeveloperEnvironment_FA7C/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="191" alt="image" src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/D2DScenarioDeveloperEnvironment_FA7C/image_thumb.png" width="255" border="0" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/D2DScenarioDeveloperEnvironment_FA7C/image_6.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="194" alt="image" src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/D2DScenarioDeveloperEnvironment_FA7C/image_thumb_1.png" width="254" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/ScenarioD2DDeveloperEnv_E51C/image_2.png"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We plan to experiment the following configurations :&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;u&gt;SOAP/ RPC style (operation oriented)&lt;/u&gt;       &lt;ol&gt;       &lt;li&gt;Mixed configuration : IIS for Site of Origin + Tomcat and JAVA-WS for Web Services          &lt;ul&gt;           &lt;li&gt;with a cross-domain policy &lt;/li&gt;            &lt;li&gt;or by servicing Web services request from IIS through the &lt;a class="" href="http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html" target="_blank" mce_href="http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html"&gt;Tomcat connector for IIS&lt;/a&gt;&lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;        &lt;li&gt;Full Java configuration : Tomcat for Site of Origin + JAVA-WS for Web Services &lt;/li&gt;        &lt;li&gt;Full Windows configuration : IIS for Site or Origin + WCF services (SOAP style) for Web Services          &lt;ul&gt;           &lt;li&gt;with a cross-domain policy &lt;/li&gt;            &lt;li&gt;or with the IIS built-in integration of WCF services through SVC resources&lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;&lt;u&gt;XML/ REST style (resource oriented)&lt;/u&gt;       &lt;ol&gt;       &lt;li&gt;Mixed configuration : IIS for Site of Origin + Tomcat and the Restlet framework for Web Services          &lt;ul&gt;           &lt;li&gt;with a cross-domain policy &lt;/li&gt;            &lt;li&gt;or by servicing Web services request from IIS through the &lt;a class="" href="http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html" target="_blank" mce_href="http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html"&gt;Tomcat connector for IIS&lt;/a&gt;&lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;        &lt;li&gt;Full Java configuration : Tomcat for Site of Origin + Restlet for Web Services &lt;/li&gt;        &lt;li&gt;Full Windows configuration : IIS for Site of Origin + WCF services (REST style) for Web Services&lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8784339" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Implementation/default.aspx">Implementation</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/D2D/default.aspx">D2D</category></item><item><title>Silverlight scenarios for Rich Internet Applications</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx</link><pubDate>Mon, 28 Jul 2008 15:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8784089</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8784089.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8784089</wfw:commentRss><description>&lt;P&gt;From the architecture described in the previous post &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/a-cup-of-silverlight-a-drop-of-architecture.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/a-cup-of-silverlight-a-drop-of-architecture.aspx"&gt;a cup of Silverlight, a drop of Architecture&lt;/A&gt;, you may experience several technical requirements : &lt;/P&gt;
&lt;UL dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;LI&gt;&lt;STRONG&gt;Infrastructure Security&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;DMZ (if the application is internet facing), &lt;/LI&gt;
&lt;LI&gt;Secured transport (HTTPS) if private communication has to be enforced (Mandatory in B2B and B2C environments)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Application Security&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;Authentication may be Form, Windows or Claim based depending on the consumer (employees, subcontractors, partners or customers) &lt;/LI&gt;
&lt;LI&gt;Authorization may be role based from various repositories (Active Directory, Claims, SQL Database)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Application Topology&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;The consumed Web Services are likely to be hosted on a distinct node in case of re-use or interop scenario. &lt;/LI&gt;
&lt;LI&gt;In new project development scenario, the Site of Origin may also host the Web Services.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Services Gateway and Protocols Adaptation&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;The consumed Web Services may not be directly accessible due to security topology (ie, requires some kind of Gateway, Reverse Proxy) &lt;/LI&gt;
&lt;LI&gt;In case of Web Services re-use, they are likely to be exposed through protocols and/or formats incompatible with the Silverlight WCF client capabilities (ie, requires some kind of Mediation, Adaptation)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;To comply with these Real World variants, we propose to categorize Silverlight Rich Client Applications into scenarios that you 'll may mix to conform to your requirements.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/SilverlightscenariosforRichInternetAppli_8D49/image_4.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=465 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/SilverlightscenariosforRichInternetAppli_8D49/image_thumb_1.png" width=572 border=0&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/scenario-d2d-developer-env.aspx"&gt;&lt;STRONG&gt;D2D&lt;/STRONG&gt; (Developer To Developer) - Development Env&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2e-scenario-intranet-environment.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2e-scenario-intranet-environment.aspx"&gt;&lt;STRONG&gt;B2E &lt;/STRONG&gt;(Business To Employee) - Silverlight App on an Intranet&lt;/A&gt;, eventually consuming pre-existing Web Services&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx"&gt;&lt;STRONG&gt;B2B&lt;/STRONG&gt; (Business to Business) - Silverlight App delivered to partners&lt;/A&gt;, consuming pre-existing Web Services with federated security enforcement&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/31/b2b-scenario-partner-env.aspx"&gt;&lt;STRONG&gt;B2C &lt;/STRONG&gt;(Business to Consumer) - Silverlight App delivered to customers&lt;/A&gt;, eventually consuming pre-existing Web Services with form based security enforcement &lt;/P&gt;
&lt;P&gt;In future posts, we discuss the architecture and an implementation sample with interoperability in mind.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8784089" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/D2D/default.aspx">D2D</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2B/default.aspx">B2B</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2E/default.aspx">B2E</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2C/default.aspx">B2C</category></item><item><title>A cup of Silverlight, a drop of Architecture</title><link>http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/a-cup-of-silverlight-a-drop-of-architecture.aspx</link><pubDate>Mon, 28 Jul 2008 13:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8783557</guid><dc:creator>Steve SFARTZ</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/silverlight_plus_java/comments/8783557.aspx</comments><wfw:commentRss>http://blogs.msdn.com/silverlight_plus_java/commentrss.aspx?PostID=8783557</wfw:commentRss><description>&lt;P&gt;We discussed before &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/24/silverlight-from-a-technical-stand-point.aspx" mce_href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/24/silverlight-from-a-technical-stand-point.aspx"&gt;what Silverlight is about from a technical standpoint&lt;/A&gt;. Moving from theory to implementation, let's discuss today the architectural challenges when building a Silverlight App. The following considerations apply to Siliverlight 2 beta 2 (current version of Silverlight as of July 2008) : &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A SilverLight app runs locally in the browser which renders a Web page composed of HTML code and a XAP archive. This archive contains presentation code (XAML), logic code (JavaScript, .Net or Dynamic) and Resources (Images… that may be accessed for Silverlight logic code). &lt;/LI&gt;
&lt;LI&gt;The Silverlight app may interact with Services in two ways and through 5 different API’s 
&lt;UL&gt;
&lt;LI&gt;HTTP stack 
&lt;UL&gt;
&lt;LI&gt;HTTP GET, POST / REST style : WebClient, HttpWebRequest &lt;/LI&gt;
&lt;LI&gt;SOAP over HTTP : WCF client&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;IP Socket 
&lt;UL&gt;
&lt;LI&gt;TCP : System.Net TCP Listener &lt;/LI&gt;
&lt;LI&gt;Socket : System.Net Sockets &lt;/LI&gt;
&lt;LI&gt;Duplex Channel: As a bonus, Silverlight 2 beta 2 brings among its set of news features, a duplex channel communication through its WCF support.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;As we focus on Silverlight interop in this blog, we will detail the HTTP aspects only. Here is some global consideration from what we've learned so far :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/AcupofSilverlightadropofArchitecture_F98F/image_2.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=414 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/AcupofSilverlightadropofArchitecture_F98F/image_thumb.png" width=537 border=0&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To fully understand the above, may we bring some complementary vocabulary and explanations : &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SOO - Site Of Origin designates the Web Site from which the XAP is downloaded, ie, your HTTP Web Server &lt;/LI&gt;
&lt;LI&gt;The Business Logic is composed of the Web Services exposed to your SL client.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The Web Services may be running on the Site Of Origin or not. Depending on this topology, your security settings need to be adapted by adding a cross domain access policy at the root of the Web Services host endpoint. This secures the invocation of services from a Silverlight client whose Site of Origin does not host the requested services endpoint. For more information about cross domain, read scorbs post "&lt;A title='Permanent Link to "Silverlight HTTP Networking Stack - Part 2 (Cross Domain Communication Overview)"' href="http://scorbs.com/2008/04/15/silverlight-http-networking-stack-part-2-cross-domain-communication-overview/" rel=bookmark&gt;Silverlight HTTP Networking Stack - Part 2 (Cross Domain Communication Overview)&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;As the Web brings two services styles (SOAP/RPC &amp;amp; XML/REST), Silverlight supports both. To decide which one to use for your Silverlight data interactions, read "&lt;A id=bp___v___r___postlist___EntryItems_ctl01_PostTitle href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/30/what-are-those-soap-rpc-and-xml-rest-styles.aspx"&gt;&lt;FONT color=#176db5&gt;What are those SOAP/RPC and XML/REST styles ?&lt;/FONT&gt;&lt;/A&gt; ".&lt;/P&gt;
&lt;P&gt;From those considerations, we propose to decline the Silverlight Architecte described above into Real World Enterprise Scenarios focusing on &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/tags/D2D/default.aspx"&gt;&lt;FONT color=#176db5&gt;D2D&lt;/FONT&gt;&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2E/default.aspx"&gt;&lt;FONT color=#176db5&gt;B2E&lt;/FONT&gt;&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2B/default.aspx"&gt;&lt;FONT color=#176db5&gt;B2B&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;or &lt;A href="http://blogs.msdn.com/silverlight_plus_java/archive/tags/B2C/default.aspx"&gt;&lt;FONT color=#176db5&gt;B2C&lt;/FONT&gt;&lt;/A&gt; scenarios: &lt;A id=bp___v___r___postlist___EntryItems_ctl02_PostTitle href="http://blogs.msdn.com/silverlight_plus_java/archive/2008/07/28/silverlight-scenarios-for-rich-internet-applications.aspx"&gt;&lt;FONT color=#176db5&gt;Silverlight scenarios for Rich Internet Applications&lt;/FONT&gt;&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;To finish with, let's discuss interoperability. We named our Web &amp;amp; App Server layer as Interaction &amp;amp; Transactional Services to refer to Microsoft SOA Reference Architecture Model where 2 nature of SOA are introduced : SOA to interact and SOA to transact, the two being connected through interop channels. This is where our Silverlight plus ... Java, .Net, PHP, Ruby... comes into play.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/ssfartz" mce_href="http://blogs.msdn.com/ssfartz"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=299 alt=image src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/AcupofSilverlightadropofArchitecture_A1F6/image5.png" width=456 border=0 mce_src="http://blogs.msdn.com/blogfiles/silverlight_plus_java/WindowsLiveWriter/AcupofSilverlightadropofArchitecture_A1F6/image_5.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8783557" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Intro/default.aspx">Intro</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/XML_2F00_REST/default.aspx">XML/REST</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/SOAP_2F00_RPC/default.aspx">SOAP/RPC</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/silverlight_plus_java/archive/tags/Interoperability/default.aspx">Interoperability</category></item></channel></rss>