Example of minimal Apache CXF2 web services deployment

minimalCXF2We had a requirement to add a web service to allow our partners to upload their events to our Calendar. Rather than spin up an entirely new application to handle this, we wanted to embed a very simple web service into the existing application. We wanted this to be very light weight and easy to implement.

I had used Apache Axis in the past so I decided to look into that first. To get a sample Axis2 application working (http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html) with one simple class representing a single web service operation it created an 11MB package, dirty folder structure, admin pages to add more services, etc. Essentially a full blown web service server with admin options. I did NOT need this and it seems a little bulky. I tried to delete some of the /WEB-INF/lib JAR files but it was not obvious what was required and what wasn’t. I tried deleting the /axis2-web folder but that made it unusable. Not to mention all the config files required/generated. Let’s try something else…

Continue reading