<?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>Guy Burstein : WCF</title><link>http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx</link><description>Tags: WCF</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit</title><link>http://blogs.msdn.com/bursteg/archive/2009/05/19/wf-wcf-using-visual-studio-2010-and-net-framework-4-training-kit.aspx</link><pubDate>Tue, 19 May 2009 16:23:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9627879</guid><dc:creator>Guy Burstein</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bursteg/comments/9627879.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bursteg/commentrss.aspx?PostID=9627879</wfw:commentRss><wfw:comment>http://blogs.msdn.com/bursteg/rsscomments.aspx?PostID=9627879</wfw:comment><description>&lt;h1&gt;WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit&lt;/h1&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit" border="0" alt="WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/WFWCFusingVisua.NETFramework4TrainingKit_E64B/WF_826378c6-a02d-44ec-8662-a875643db14e.png" width="263" height="51" /&gt;&amp;#160;&amp;#160; &lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit" border="0" alt="WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/WFWCFusingVisua.NETFramework4TrainingKit_E64B/WCF_449d2a51-c2ce-4abe-80d6-0a156237c6b9.png" width="310" height="47" /&gt; &lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;Microsoft WF/WCF using Visual Studio 2010 and .NET Framework 4 Training Kit&lt;/strong&gt; includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2010 features and a variety of WF and WCF new features.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Learn &lt;strong&gt;basic workflow creation&lt;/strong&gt;, hosting and running , and test-drive workflow development. &lt;/li&gt;    &lt;li&gt;Get an introduction to workflow services, communication between workflows and content based correlation of workflow instances. &lt;/li&gt;    &lt;li&gt;Use the flexibility of &lt;strong&gt;Flowchart&lt;/strong&gt; workflow activities to implement non-sequential workflows. &lt;/li&gt;    &lt;li&gt;Learn how to &lt;strong&gt;rehost the workflow designer&lt;/strong&gt; in a WPF desktop application and customize it in several ways. &lt;/li&gt;    &lt;li&gt;Learn how you can leverage some of the main &lt;strong&gt;WF and WCF monitoring&lt;/strong&gt; features to track application execution and troubleshoot problems with services when necessary. &lt;/li&gt;    &lt;li&gt;Learn how &lt;strong&gt;Service discovery&lt;/strong&gt; allows you to locate services on the same subnet using ad hoc discovery, or using a proxy to establish connections with servers regardless of where they are. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This version of the training kit is compatible with &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2009/05/18/visual-studio-2010-beta-1-is-available-for-msdn-subscribers.aspx"&gt;Visual Studio 2010 Beta 1&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Download &lt;a href="http://code.msdn.microsoft.com/wcfwf4/Release/ProjectReleases.aspx?ReleaseId=2698"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9627879" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/.Net+Framework+4.0/default.aspx">.Net Framework 4.0</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/WF4/default.aspx">WF4</category></item><item><title>Training Kit for VS 2008 SP1 and .Net Framework 3.5 SP1</title><link>http://blogs.msdn.com/bursteg/archive/2008/08/12/training-kit-for-vs-2008-sp1-and-net-framework-3-5-sp1.aspx</link><pubDate>Tue, 12 Aug 2008 01:01:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8849272</guid><dc:creator>Guy Burstein</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/bursteg/comments/8849272.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bursteg/commentrss.aspx?PostID=8849272</wfw:commentRss><wfw:comment>http://blogs.msdn.com/bursteg/rsscomments.aspx?PostID=8849272</wfw:comment><description>&lt;h1&gt;Training Kit for VS 2008 SP1 and .Net Framework 3.5 SP1&lt;/h1&gt;  &lt;p&gt;&lt;img style="margin: 0px 0px 0px 20px" border="0" alt="Training Kit for VS 2008 SP1 and .Net Framework 3.5 SP1" align="right" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/TrainingKitforVS2008SP1and.NetFrame.5SP1_DAD/dpe2_6d0ae192-8edb-459d-b563-6b450573dadd.jpg" width="235" height="60" /&gt;The ASP.Net 3. 5 Enhancement &lt;strong&gt;Training Kit&lt;/strong&gt; was updated to &lt;strong&gt;VS 2008 SP1 and .Net Framework 3.5 SP1&lt;/strong&gt; and is available for download. This kit contains presentations, demos and labs for getting started with the new technologies that shipped as part of the service pack.&lt;/p&gt;  &lt;p&gt;Download &lt;a href="http://download.microsoft.com/download/9/5/5/95586df3-dd73-4a90-9bdf-a10f3cd6a254/.NET%20Framework%203.5%20Enhancements%20Training%20Kit-20080811.exe"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8849272" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bursteg/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/ADO.Net+Entity+Framework/default.aspx">ADO.Net Entity Framework</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/ADO.Net+Data+Services/default.aspx">ADO.Net Data Services</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx">WCF</category></item><item><title>How To: Call Java EE Web Service from Silverlight Client</title><link>http://blogs.msdn.com/bursteg/archive/2008/07/19/how-to-call-java-ee-web-service-from-silverlight-client.aspx</link><pubDate>Sat, 19 Jul 2008 14:30:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8754654</guid><dc:creator>Guy Burstein</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/bursteg/comments/8754654.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bursteg/commentrss.aspx?PostID=8754654</wfw:commentRss><wfw:comment>http://blogs.msdn.com/bursteg/rsscomments.aspx?PostID=8754654</wfw:comment><description>&lt;h1&gt;How To: Call Java EE Web Service from Silverlight Client&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallJavaEEWebServicefromSilverlight_C93A/jee_2.jpg"&gt;&lt;img title="Java EE Web Service Silverlight Client" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 0px 15px; border-right-width: 0px" height="48" alt="Java EE Web Service Silverlight Client" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallJavaEEWebServicefromSilverlight_C93A/jee_thumb.jpg" width="48" align="right" border="0" /&gt;&lt;/a&gt; I have already posted about &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/07/19/how-to-call-a-java-ee-web-service-from-a-net-client.aspx"&gt;How To: Call a Java EE Web Service from a .Net Client&lt;/a&gt;, but if Silverlight is the .Net client application that consumes that service, there are several issues you should be aware of.&lt;/p&gt;  &lt;h3&gt;Only asynchronous operations&lt;/h3&gt;  &lt;p&gt;When adding a service reference from a Silverlight application to any web service, the generated proxy has only async operations. This means that instead of calling the operation and get the result:&lt;/p&gt;  &lt;div style="font-size: 11pt; background: white; color: black; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #2b91af"&gt;CalculatorServiceClient&lt;/span&gt; proxy = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;CalculatorServiceClient&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;int&lt;/span&gt; result = proxy.Add(2, 3);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;Calculator Service returned: &amp;quot;&lt;/span&gt; + result.ToString());&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;what you have to do is call the &lt;strong&gt;async&lt;/strong&gt; version of this method, and register to the &lt;strong&gt;completed&lt;/strong&gt; event:&lt;/p&gt;  &lt;div style="font-size: 11pt; background: white; color: black; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #2b91af"&gt;CalculatorServiceClient&lt;/span&gt; proxy = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;CalculatorServiceClient&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;proxy.AddCompleted += proxy_AddCompleted;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;proxy.AddAsync(a, b);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;and as the implementation of the proxy_AddCompleted method, get the result:&lt;/p&gt;  &lt;div style="font-size: 11pt; background: white; color: black; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;void&lt;/span&gt; proxy_AddCompleted(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;AddCompletedEventArgs&lt;/span&gt; e)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;int&lt;/span&gt; result = e.Result;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ...&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Cross Domain Calls&lt;/h3&gt;  &lt;p&gt;Since the Java service is probably hosted on another domain, calling it is considered as a cross domain access. I have posted about the &lt;a title="Silverlight WCF 404 HTTP" href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/07/19/Silverlight-WCF-HTTP-404.aspx"&gt;HTTP 404 error when calling a service from a Silverlight Client across domains&lt;/a&gt;, and this solution applies here too.&lt;/p&gt;  &lt;p&gt;The thing is that since the &lt;strong&gt;Java EE&lt;/strong&gt; is hosted on another web server than IIS, you should place the &lt;strong&gt;clientaccesspolicy.xml&lt;/strong&gt; file on the root of your domain. On my machine, I have &lt;strong&gt;GlassFish V2&lt;/strong&gt; installed, and the file should be placed at: C:\Users\guyb\.personalDomain\personalDomain\docroot\ folder.&lt;/p&gt;  &lt;p&gt;Hope this helps!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8754654" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/Java/default.aspx">Java</category></item><item><title>How To: Call a Java EE Web Service from a .Net Client</title><link>http://blogs.msdn.com/bursteg/archive/2008/07/19/how-to-call-a-java-ee-web-service-from-a-net-client.aspx</link><pubDate>Sat, 19 Jul 2008 13:51:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8754541</guid><dc:creator>Guy Burstein</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/bursteg/comments/8754541.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bursteg/commentrss.aspx?PostID=8754541</wfw:commentRss><wfw:comment>http://blogs.msdn.com/bursteg/rsscomments.aspx?PostID=8754541</wfw:comment><description>&lt;h1&gt;How To: Call a Java EE Web Service from a .Net Client&lt;/h1&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img title="Call a Java EE Web Service .Net Interoperability" style="margin: 10px 0px 20px 25px" height="48" alt="Call a Java EE Web Service .Net Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/jee_a3a86867-dd00-496e-b6ef-ebed23e612d4.jpg" width="48" align="right" border="0" /&gt;Many organizations have server side investments in Java technologies. While they want to build a compelling UI with Microsoft’s latest technologies, such as WPF and Silverlight, they still want to benefit from those existing investments instead of rewriting them. In order to do so, we have to bridge between those technologies and allow client side technologies consume Java web services.&lt;/p&gt;  &lt;p&gt;This post is a step by step guide for building a Java EE Web Service, and a .Net client application that consumes it.&lt;/p&gt;   &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Before we get started with this walkthrough, make sure you have the following installed on your machine:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;Java Development Kit (JDK) 6&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;Java EE 5 SDK&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://download.netbeans.org/netbeans/6.1/final/"&gt;NetBeans 6.1 IDE (Web &amp;amp; Java EE)&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Create a Java Web Service (Java EE, JAX-WS)&lt;/h2&gt;  &lt;h3&gt;1. Create a new Web Application&lt;/h3&gt;  &lt;p&gt;In the NetBeans 6.1 IDE, choose &lt;strong&gt;File&lt;/strong&gt; –&amp;gt; &lt;strong&gt;New Project&lt;/strong&gt;. In the New Project Dialog select the &lt;strong&gt;Web&lt;/strong&gt; category, and choose &lt;strong&gt;Web Application&lt;/strong&gt; from the projects list. Then, Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;* If the web category is not available in this dialog, it means that the NetBeans version you have installed isn’t the Web and Java EE package.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="370" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_00921b43-44c8-43e7-9954-721bb4a52316.png" width="540" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;In the Name and Location page, set the &lt;strong&gt;location&lt;/strong&gt; where you want to create the web application, and provide a &lt;strong&gt;name&lt;/strong&gt; for the project. Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="334" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_2bb2efd0-0f14-4077-b31c-f64a16b85aef.png" width="540" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;In the Server and Settings page, leave the default settings (Java EE 5, Use GlassFish V2) and Click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="334" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_1814c77f-f6ea-4930-be4f-42f742fb5531.png" width="540" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;This creates the initial web application and opens the project for editing.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="209" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_5d95082a-9b2f-435c-844e-7085e386dc88.png" width="153" border="0" /&gt; &lt;/p&gt;  &lt;h3&gt;2. Create the Web Service&lt;/h3&gt;  &lt;p&gt;Add a new web service to the project. &lt;strong&gt;Right click&lt;/strong&gt; the project node and choose &lt;strong&gt;New&lt;/strong&gt; –&amp;gt; &lt;strong&gt;Web Service&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="184" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_241fc9c1-3247-44ab-8c32-093ccdf7115b.png" width="604" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;* Notice that the location of the Web Service option in the menu may change from this image and your IDE.&lt;/p&gt;  &lt;p&gt;In the New Web Service dialog, provide the &lt;strong&gt;Web Service Name&lt;/strong&gt;, and the &lt;strong&gt;Package&lt;/strong&gt;. The name of the service will affect the final URL for calling the service, and the package name will be the namespace of the service contract. Click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="403" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_65dcea9f-56c7-4a57-94c1-8378c0067a91.png" width="540" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;The Web Service now appears in the project tree.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="192" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_e21ceead-3b07-4f9d-b067-8359757c8f63.png" width="175" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;To implement the service, double click the service node in the project tree (in the figure above – CalculatorService). This will open the Web Service in Design mode, that lets you graphically design your service.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="314" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_65868a6a-936f-49eb-8c0f-42dd505963e9.png" width="606" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Change to &lt;strong&gt;Source View&lt;/strong&gt; by clicking on the &lt;strong&gt;Source&lt;/strong&gt; button in the upper toolbar, and this will open the CalculatorService.Java file for editing. Here is a sample implementation of the service. Notice how Java Annotations are similar to .Net Attributes, especially how similar they are to the Web Services attributes we know…&lt;/p&gt;  &lt;div style="font-size: 11pt; background: white; color: black; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;package org.bursteg.calculator;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;import javax.jws.WebMethod;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;import javax.jws.WebParam;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;import javax.jws.WebService;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;@WebService&lt;/p&gt;    &lt;p style="margin: 0px"&gt;public class CalculatorService &lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @WebMethod&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public int Add(@WebParam(name=&amp;quot;a&amp;quot;) int a, &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @WebParam(name=&amp;quot;b&amp;quot;) int b) &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return a + b;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Deploy the web service to the web application server. From the NetBeans IDE this is done by &lt;strong&gt;right clicking&lt;/strong&gt; the project node, and choosing &lt;strong&gt;Undeploy and Deploy&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="281" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_d7967448-5b50-4d62-8f31-fc978b6e1933.png" width="329" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;After the web application has been deployed, just to make sure the web service works as expected,&amp;#160; you can &lt;strong&gt;right click&lt;/strong&gt; the web service node, and choose &lt;strong&gt;Test Web Service&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="379" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_2c8cedcb-c60a-4550-afa9-58e091d5b0fc.png" width="403" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;This will open the browser and navigate to a test page with the url of the service (&lt;a title="http://localhost:9232/Calculator/CalculatorServiceService" href="http://localhost:9232/Calculator/CalculatorServiceService"&gt;http://localhost:9232/Calculator/CalculatorServiceService&lt;/a&gt;) with a ?Tester suffix.&lt;/p&gt;  &lt;h2&gt;Call the Java Web Service from a .Net Client&lt;/h2&gt;  &lt;p&gt;In Visual Studio 2008, create a new console application.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="344" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_b8c958f2-c672-4c84-a62c-a3a6c9de0da6.png" width="540" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;This creates a new solution with a single Console Application project in it.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Right click&lt;/strong&gt; the project node and choose &lt;strong&gt;Add Service Reference&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="268" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_92498450-fd8f-4568-9191-2b7b974ed348.png" width="451" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;In the Add Service Reference Dialog, paste the address of the service metadata endpoint (service address + ?wsdl suffix: &lt;a title="http://localhost:9232/Calculator/CalculatorServiceService?wsdl" href="http://localhost:9232/Calculator/CalculatorServiceService?wsdl"&gt;http://localhost:9232/Calculator/CalculatorServiceService?wsdl&lt;/a&gt;), and click&lt;strong&gt; Go&lt;/strong&gt;. The dialog will get the service metadata and understand the service contract.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="435" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_71b74920-bf31-4aff-a377-9a1c8a20fb36.png" width="540" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Provide a &lt;strong&gt;namespace&lt;/strong&gt; for the service reference, and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;This will generate the client side proxy that lets you consume the service easily, and the required configuration settings into the configuration file.&lt;/p&gt;  &lt;p&gt;&lt;img title="Java EE Web Service .Net Client Interoperability" style="margin: 0px" height="273" alt="Java EE Web Service .Net Client Interoperability" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/HowToCallaJavaEEWebServicefrom.NetClient_1138C/image_a57f2ea1-4133-4a36-b078-7e24c1aaa00f.png" width="287" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;To call the service using the generated client side proxy, open Program.cs and use the following code:&lt;/p&gt;  &lt;div style="font-size: 11pt; background: white; color: black; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;static&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue"&gt;string&lt;/span&gt;[] args)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;CalculatorServiceClient&lt;/span&gt; proxy = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;CalculatorServiceClient&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;int&lt;/span&gt; result = proxy.Add(2, 3);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;Calculator Service returned: &amp;quot;&lt;/span&gt; + result.ToString());&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Run the program and see that the web service is being called and the result is correct.&lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;Since &lt;strong&gt;Java EE Web Services&lt;/strong&gt; (JAX-WS) are standard SOAP services, they are easily interoperable from a .Net client application with only several clicks. Visual Studio generated a &lt;strong&gt;.Net client proxy&lt;/strong&gt; that makes it very easy to connect and call the service.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8754541" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bursteg/archive/tags/.Net+Framework+3.5/default.aspx">.Net Framework 3.5</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/Java/default.aspx">Java</category></item><item><title>Silverlight WCF Returns HTTP 404</title><link>http://blogs.msdn.com/bursteg/archive/2008/07/19/silverlight-wcf-returns-http-404.aspx</link><pubDate>Sat, 19 Jul 2008 09:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8751924</guid><dc:creator>Guy Burstein</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/bursteg/comments/8751924.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bursteg/commentrss.aspx?PostID=8751924</wfw:commentRss><wfw:comment>http://blogs.msdn.com/bursteg/rsscomments.aspx?PostID=8751924</wfw:comment><description>&lt;h1&gt;Silverlight WCF Returns HTTP 404&lt;/h1&gt;  &lt;p&gt;&lt;img title="Silverlight WCF HTTP 404" style="margin: 15px 0px 25px 30px" height="69" alt="Silverlight WCF HTTP 404" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/SilverlightWCFReturnsHTTP404_B52/Silverlight_a3c05b54-ae6c-4a1c-a17c-eb60103ac05d.jpg" width="62" align="right" border="0" /&gt; Today I ran into something weird. I created a &lt;strong&gt;WCF&lt;/strong&gt; Service and tested it with simple .Net client application and it worked fine. Than, I built a &lt;strong&gt;Silverlight&lt;/strong&gt; application and tried to call the same service, but kept getting: &lt;strong&gt;System.ServiceModel.ProtocolException&lt;/strong&gt;: &amp;quot;&lt;strong&gt;The remote server returned an unexpected response: (404) Not Found&lt;/strong&gt;.&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;a title="Silverlight WCF HTTP 404" href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/07/19/Silverlight-WCF-HTTP-404.aspx"&gt;Here’s the solution for this problem…&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8751924" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/bursteg/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Beta Release of WCF Visualizers is available for Download!</title><link>http://blogs.msdn.com/bursteg/archive/2008/05/05/wcf-visualizers-beta.aspx</link><pubDate>Mon, 05 May 2008 15:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8460339</guid><dc:creator>Guy Burstein</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/bursteg/comments/8460339.aspx</comments><wfw:commentRss>http://blogs.msdn.com/bursteg/commentrss.aspx?PostID=8460339</wfw:commentRss><wfw:comment>http://blogs.msdn.com/bursteg/rsscomments.aspx?PostID=8460339</wfw:comment><description>&lt;H1&gt;Beta Release of WCF Visualizers is available for Download!&lt;/H1&gt;
&lt;P&gt;Today, Eyal Vardi from Experts4D (a large consulting company in Israel who specializes in advanced .Net technologies) released a new version of this open source project - &lt;A title="WCF Visualizers" href="http://www.codeplex.com/WCFVisualizer" mce_href="http://www.codeplex.com/WCFVisualizer"&gt;WCF Visualizers&lt;/A&gt;. 
&lt;P&gt;If you are not familiar with those visualizers, you should, since they make developing and debugging WCF based solutions much much easier. 
&lt;P&gt;The project contains two main visualizers: 
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;WCF Service Visualizer&lt;/STRONG&gt;&lt;BR&gt;This visualizer shows different views of your WCF Service Host: the service description, pipeline, security and operation context.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/WCFVisualizer_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/WCFVisualizer_2.jpg"&gt;&lt;IMG style="MARGIN: 0px 0px 0px 40px" height=288 alt="WCF Service Visualizer" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/WCFVisualizer_thumb.jpg" width=360 border=0 mce_src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/WCFVisualizer_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;WCF Client Visualizer&lt;/STRONG&gt;&lt;BR&gt;This visualizer shows the client side description, including the ClientRuntime, Description and OperationContext.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/image_2.png"&gt;&lt;IMG style="MARGIN: 0px 0px 0px 35px" height=214 alt="WCF Client Visualizer" src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/image_thumb.png" width=360 border=0 mce_src="http://blogs.msdn.com/blogfiles/bursteg/WindowsLiveWriter/BetaReleaseofWCFVisualizersisavailablefo_D9EC/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;From this release's page: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;New features this release 1.5:&lt;BR&gt;1. ClientRuntime Visualizer was added&lt;BR&gt;2. Binding Visualizer was added&lt;BR&gt;3. IError Handler View&lt;BR&gt;5. SecurityContext Visualizer was added&lt;BR&gt;6. Security Visualizer was added&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can find the &lt;A href="http://www.codeplex.com/WCFVisualizer" mce_href="http://www.codeplex.com/WCFVisualizer"&gt;WCF Visualizers Home Page on codeplex&lt;/A&gt;, and you can find the latest release &lt;A href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=WCFVisualizer&amp;amp;ReleaseId=13144" mce_href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=WCFVisualizer&amp;amp;ReleaseId=13144"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8460339" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/bursteg/archive/tags/WCF/default.aspx">WCF</category></item></channel></rss>