Search Results

Monday, May 19, 2008

Exposing same interface as REST (JAX-RS) and SOAP (WS-*) (JAX-WS) Service using CXF

This article is something which I wanted to accomplish from a very long time (may be a 1.5 years) from the start of my career in SOA, web services, finally I believe I found a good framework and a set of tools that helped me in achieving my goal.

I always wanted to expose the same CRUD system using both REST and WS-* styles. As I searched a lot about implementing REST services using Java & Java frameworks, I couldn't find one example which can explain me REST in simple terms (Java terms) until I read this article from


Later I read few very interesting articles which claim that implementation of REST system using Java Based WS-* tools are inappropriate. Like this one here:

Any way I don't claim that I have achieved something impossible but I am here to get an evaluation report on my work, in fact I wish some REST experts can take a look this and let me know, if whatever I followed is at least a basic REST based CRUD system, which also has WS-* interface for the same CRUD operations, also suggesting some corrections and improvements needed if any.

The main problem to start learning REST and WS-*, is that there are infinite number of articles and resources explaining the REST &(vs) WS-* and most of them are only theory and arguments, which generally are kind of cryptic, which leaves the new people entering the world of SOA wondering (Wandering too! as there is no single source of accuracy) with the “Buzz Words” rocking SOA what more can be expected!

Hence I wanted to give a simple way to implement both a WS-* Service as well as REST service which expose same set of operations (methods) in both the styles making the life simple to understand and start with web services technologies.

Again I am not here to argue about WS-* vs REST it left to the readers but I felt this is a very nice link which can change the way we look at things.


Being thankful to all the authors whose articles I have read and which gave me confidence enough to build a basic CRUD application and publish in public for evaluation.

I wait for all your valuable suggestions, comments and corrections.

The way I am planning to post this article is in 3 parts.

  1. Service Implementation.
  2. REST Client.
  3. SOAP Client.

No comments: