Developing Web Services with Apache CXF and Axis2 (3red Edition)

If you'd like to learn how to create web services (in particular, using Apache CXF or Axis2) and make some sense of various standards like JAX-WS, JAX-RS, JAXB, SOAP, WSDL, REST, MTOM, WS-Security, WS-Policy, XML Encryption and XML Signature, then this book is for you. Why?
  • It has a tutorial style that walks you through in a step-by-step manner.
  • It is concise. There is no lengthy, abstract description.
  • Many diagrams are used to show the flow of processing and high level concepts so that you get a whole picture of what's happening.
  • It contains working code.
  • The first two chapters are freely available here on You can judge it yourself.

What the experts say (1st edition)

'Very nice, very readable, very detailed, very useful to newbie Axis developers', said Anne Thomas Manes.

Table of Contents

Chapter 1 Designing the interface for a simple web service

Chapter 2 Implementing a web service

Chapter 3 Viewing the SOAP messages

Chapter 4 Accepting multiple parameters

Chapter 5 Sending and receiving complex data structures

Chapter 6 Sending binary files

Chapter 7 Invoking lengthy operations

Chapter 8 Signing and encrypting SOAP messages

Chapter 9 Creating scalable web services with REST

Chapter 10 Deploying your services and integrating them with Spring

Chapter 11 Unit testing your web services

A more detailed TOC is here. Content highlights:
  • How to work with both Apache CXF 2.2.x and Axis2 1.5.x using standard API (JAX-WS, JAX-RS) as much as possible.
  • How to use caching to create scalable RESTful web services.
  • How to encrypt and sign SOAP messages using Rampart.
  • How to send user authentication information using Rampart.
  • How to send and receive binary files using MTOM.
  • How to unit test web services.

Target audience and prerequisites

This book is suitable for those who would like to learn how to develop web services in Java. In order to understand what's in the book, you need to know Java and to have edited XML files. However, you do NOT need to know more advanced XML concepts (e.g., XML schema, XML namespace), servlet, Tomcat or PKI.

Download or purchase

Download free chaptersThe first two chapters available here
Get the rest of the book in PDFPurchase the PDF with PayPal (US$24.95) by clicking this button:

Usually within 24 hours you'll receive an email containing the instruction on how to download the book. Within one year of the purchase if there is any update to the book, I'll send you the updated PDF.

If your credit card is not accepted by PayPal, you can pay with MoneyBookers by clicking the button below:

If you own a previous copy of the book or a hard copy, you can get a discount.


Just like a printed copy,  the PDF (including any soft or hard copy you make from it) can be legally accessed by one person at a time. To allow more than one people to access it concurrently, you can get a site license.

Get a hard copy

Get it from Lulu or on Amazon.

Download the complete source code in the bookSource code in the book

Previous editions

The first edition covers Apache Axis. The second edition covers Axis2 1.3.

About the author

Click here to learn more about the author (me).


Please check the change log. The PDF version and the current print version already include the changes.
Kent Tong,
Oct 7, 2012, 1:16 AM
Kent Tong,
Oct 7, 2012, 1:16 AM
Kent Tong,
Oct 8, 2012, 12:22 AM
Kent Tong,
Oct 8, 2012, 12:22 AM
Kent Tong,
Oct 7, 2012, 1:16 AM