Wednesday, January 30, 2013

Developing Webservices using Apache's CXF

First Thing First

In an attempt to break my silence for some time here I am planning to blog a series of articles that would talk about developing web services using CXF and Spring framework.
Most of this related to some of the work I did in the past and also one presentation earlier this year for CJUG (Chicgao Java Users Group) on Developing web services using Apache's CXF.
I am planning to kick of few more articles to cover following,

  • Leg work - Setting up a project, writing simple service, publish and test.
  • Advanced topics - introduce CXF invokers, interceptors etc.
  • Method level Validation using JSR 303, hibernate validators

Anyways I am providing links to my presentation and sample code used for the presentation for those who are more interested in the code rather than writings.
You can checkout the code from google code i.e git repository. These are maven projects and shouldn't be big deal in setting up with in your eclipse and running it.
There are 2 projects loanProcessingService and creditHistoryService available to download.
Once you download the source code, you could import the projects as maven projects in to the eclipse.
You could run maven clean install in the eclipse or through command prompt, it doesn't matter.
Find package in either of these projects, you could see client and server classes these would help you test services outside any container.
Simply run the server as java application, once server is ready run the client.

Now you can fire up your tomcat and publish these web applications.
The soap UI project xml file can be found at src/test/resources/soapui/xyz.xml.
Bring up the soap UI, import the project by pointing to the above xml, simply open up the request for the method and execute it.

That's all for now, have fun with code.

Here is my CJUG Presentation.
Checkout the source code from here.