WCF and Java Interop Series introduction

Apr 20, 2009

This article is a part of WCF & Java Interop

WCF and Java Interop Series introduction

This series of articles is about how to use Java (WSIT, METRO) to communicate with applications developed with Windows Communication Foundation (WCF).

Web Service has been accepted globally by developers because of its ease of integration, availability of development tools, and adoption by big players, such as SUN, Microsoft, and Oracle.

In the past, I used to use Sockets to program the network layer. With sockets, we can have a full control over the network layer, and the performance is good. However, it is difficult for third-parties to integrate with our applications. When altering the network interface, it is necessary to change the serialization and deserialization code.

WCF Introduction

“Windows Communication Foundation (WCF) is Microsoft’s unified programming model for building service-oriented applications. It provides integration and interoperability with existing .NET Framework distributed systems technologies such as Message Queuing (MSMQ), COM+, ASP.NET Web services, Web Services Enhancements (WSE), and many other functions.”

In a nutshell, WCF does all the network plumbing work for you. You do not need to worry about whether or not you are going to use web service, MSMQ, raw TCP/IP socket or other technologies. For example, you can develop your entire application based on TCP/IP socket with WCF at the beginning, and when you need to switch to web service, you only need to change the endpoint on the server side and regenerate the proxy on the client side. All other parts of your application can remain unchanged.

Metro Introduction

Metro is an open source Java-based web service development stack. “The Metro stack consists of JAX-WS, JAXB, and WSIT, which enable you to create and deploy secure, reliable, transactional, and easily integratable Web services and clients.”

A Real World Case Study of WCF and Java (Metro) Interoperability

We started Dynamsoft SCM Anywhere project, which is a SCM solution with integrated Version Control, Issue Tracking and Build Automation about a year ago. As the product architect, I am responsible for choosing a proper network technology for our team. After developing several small trial projects, WCF and Metro were chosen. Recently, we have released SCM Anywhere, and the result proves that using WCF and Java (Metro) was a wise choice.

The architecture of SCM Anywhere is as follows:

The architecture of SCM Anywhere (The architecture of SCM Anywhere)

The SCM Anywhere server and Windows client are developed with WCF and programmed in C# with Visual Studio 2008. The cross-platform client is developed with Metro/WSIT and programming in Java with Eclipse.

We use wsimport tool in Metro to generate Java client-side artifacts by importing a WSDL file (server side). Then, we implement the Java client to invoke WCF services. Developing the Windows client with WCF is straightforward, and the tool is integrated into Visual Studio 2008.

Links: Next article »»: WCF client and WCF service WCF & Java Interop series home page: WCF & Java Interop

Search Blog Posts