Many Enterprise companies have built their Enterprise application in Java technologies as middle tier or server side. While they want to build a compelling UI with Microsoft’s latest technologies, such as WPF 3.5 and Silver light 2.0, 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. In this blog I am going to show you a step by step guide for building a Java EE Web Service, and a .Net client application that consumes it.
First of all let make sure that we have the following Software components installed on your machine.
Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences. With WPF, you can create a wide range of both windows standalone and web browser-hosted applications.
WPF uses XAML (Zammel) Extensible Application Markup language to design the GUI.
Silver Light: This is Microsoft latest SDK for to develop RIA.
1. Java JDK 6.1
2. Net Beans IDE 6.1
1. VS.NET 2008
2. Silver Light 2.0 SDK
First we need to create a new java web project , for that you can use either eclipse or Netbeans. here i downloaded a free Net beans 6.1 from Net Beans download
Here i have added two WebMethods Add and Greetings . This is same as .NET ASMX web service we use [WebMethod] attribute to define a method which can invoked across the internet.
Once Java WebService Developed and Deployed successfully now we need to create WPF windows application. add Service Reference as a Java web service as shown.
Define WPF UI using XAML as shown .
same way we can use SilverLight 2.0 client to invoke Java WebService.