Social Media

Apache CXF – Quickstart

Is an open source web services development framework using JAX-WS and JAX-RS. Its goals are to be –

  • High Performance
  • Extensible
  • Intuitive & Easy to Use

It supports a number of protocols and transport including –

  • Protocols – SOAP, RESTful HTTP
  • Transport – HTTP, JMS, JBI(Java Business Integration)


The easiest way to create a CXF web service is through the servicemix archetypes(

[sourcecode] mvn archetype:generate \
-DarchetypeGroupId=org.apache.servicemix.tooling \
-DarchetypeArtifactId=servicemix-cxf-code-first-osgi-bundle \
-DarchetypeVersion=2013.01 \
-DgroupId=com.glenware.cxf \
-DartifactId=myfirstcxf \

Compile and install –

[sourcecode] mvn clean install

Then its a matter of installing the package in Fuse or ServiceMix –

[sourcecode] JBossFuse:karaf@root> install mvn:com.glenware.cxf/myfirstcxf/1.0-SNAPSHOT
JBossFuse:karaf@root> list
JBossFuse:karaf@root> start <number>

Test the service is installed –


Or –

cd get-started/myfirstcxf
[sourcecode] mvn -Pclient
[/sourcecode] References

About the Author Martin Farrell

My name is Martin Farrell. I have almost 20 years Java experience. I specialize inthe Spring Framework and JEE. I’ve consulted to a range of businesses, and have provide Java and Spring mentoring and training. You can learn more at About or on my consultancy website Glendevon Software

follow me on:

Leave a Comment: