Free Sample
+ Collection

Apache CXF Web Service Development

Naveen Balani, Rajeev Hathi

Learn how to design and develop SOAP and RESTful web services using the Apache CXF framework. This course flattens the learning curve with practical examples to take you from novice to expert in easy steps.
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847195401
Paperback336 pages

About This Book

  • Design and develop web services using contract-first and code-first approaches
  • Publish web services using various CXF frontends such as JAX-WS and Simple frontend
  • Invoke services by configuring CXF transports
  • Create custom interceptors by implementing advanced features such as CXF Interceptors, CXF Invokers, and CXF Features
  • The first practical guide on Apache CXF with real-world examples

Who This Book Is For

This book is for developers who want to design and develop SOAP and RESTful services using Apache CXF framework and leverage various CXF features for service development. It is ideal for developers who have some experience in Java application development as well as some basic knowledge of web services, but it covers some of the basic fundamentals of web services and REST to get you acquainted with these technologies before using these concepts to develop services using the CXF framework.

Table of Contents

Chapter 1: Getting Familiar with CXF
Web service technology standards
Introducing web services
Apache CXF
Setting up the environment
Chapter 2: Developing a Web Service with CXF
The Order Processing Application
Developing a service
Developing a client
Running the program
CXF architecture
Chapter 3: Working with CXF Frontends
JAX-WS frontend
Using dynamic client
Provider and Dispatch services
Simple frontend
Running the simple frontend example
Chapter 4: Learning about Service Transports
Transport protocols in CXF
Chapter 5: Implementing Advanced Features
Understanding CXF interceptors
Developing the custom interceptor
Understanding CXF features
Applying the GZIP feature to the Order Process web service
Understanding CXF Invoker
Developing custom invoker
Chapter 6: Developing RESTful Services with CXF
Overview of REST and RESTful services
Developing end-to-end RESTful services using CXF JAX-RS implementation
Chapter 7: Deploying RESTful Services with CXF
Packaging the Book Shop application
Invoking operations on the Book Shop RESTful application
Configuring JSON support for the Book Shop application
Intercepting messages for the Book Shop application
Deploying the Book Shop application in the application servers
Chapter 8: Working with CXF Tools
Invoking a web service using the Java client
Invoking the web service using JavaScript
Creating Service Implementation from the WSDL file
Validating WSDL files

What You Will Learn

  • Become familiar with the different features of Apache CXF architecture and set up the CXF environment
  • Develop a simple web service using CXF-based Spring configuration
  • Build a web service using contract-first and code-first approaches in simple frontend APIs such as JAX-WS
  • Create dynamic web service clients by using various CXF frontend APIs
  • Develop web services with different transports by configuring various CXF transports such as HTTP, HTTP(S), JMS, and CXF Local
  • Create RESTful services that support JSON and XML as the message formats
  • Develop services with features such as Interceptors by implementing advanced CXF features
  • Attain configuration and dependency management by integrating web services with the de facto Spring framework
  • Unit test POJO services in a stand-alone environment as well as promote applications to the Tomcat container for production ready deployments
  • Speed-start developing web services by using CXF tools effectively
  • Basics of Spring framework and IOC container for readers who are not acquainted with Spring framework

In Detail

Apache CXF framework helps you to develop a standards-based programming model and also provides a flexible deployment model for deploying web services. Developing SOAP and RESTful applications can be made easy by using Apache CXF framework. However, getting started with developing web services using the Apache CXF framework is not easy.

This is the first book that gives details on how to use the Apache CXF framework for developing SOAP and REST web services. It is a hands-on practical guide that simplifies working with CXF framework as it covers all major aspects with real-world examples. The chapters cover the various CXF features in detail and each has systematic steps with practical, simple examples to implement these features on your web services.

The book introduces the Apache CXF framework and its features such as Frontend API, Data Bindings, Transports, Spring-based configuration, and CXF tools. It also has chapters on SOAP and RESTful services. It will help you create RESTful services that support XML as well as the widely accepted Java Script Object Notation (JSON) format. It explains the components of CXF architecture that help developers customize the Apache CXF framework to suit the target application. The book covers both code-first and contract-first approaches for service deployment. You will see how to develop services in a flexible deployment model offered by CXF, unit test them in a stand-alone environment, and finally promote them in an application server environment.

The instructions in this book will help developers to build their application according their requirements by using any of the frontends supported by Apache CXF framework. The various CXF frontend APIs covered in this book provide a wide variety of options in developing and deploying your application.

The book introduces some advanced concepts such as Interceptors and features that will add extra capability to your service component. It will help you take advantage of different transport features offered by the CXF runtime such as HTTP, HTTP(S), and JMS protocols.
Finally, the book mentions various tools that help developers creating web services as well as creating Java and JavaScript-based web services clients which invoke a real-world .NET web service. These tools are standard batch files that can be easily executed from the Windows command shell by following the instructions in the book.


Read More