Wednesday, January 30, 2013

Developing Webservices using Apache's CXF


In this article I would like to talk about developing web services using CXF and Spring framework. I did this presentation earlier this year for CJUG (Chicgao Java Users Group) on Developing web services using Apache's CXF.

First Thing First

I would plan on discussing few advance topics sometime in the future to cover topics like - CXF Invokers, Interceptors, method level Validation using JSR 303 and using Hibernate validators etc.

Find links to my presentation and sample code used for the presentation below.
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 xyz.abc.xyz.local package in either of these projects, you could see client and server classes these would help you test services outside of 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.

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

No comments:

Post a Comment