Book Image

Apache CXF Web Service Development

By : Naveen Balani, Rajeev Hathi
Book Image

Apache CXF Web Service Development

By: Naveen Balani, Rajeev Hathi

Overview of this book

<p>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.<br /><br />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. <br /><br />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.<br /><br />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.<br /><br />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.<br />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.</p>
Table of Contents (16 chapters)
Apache CXF Web Service Development
Credits
About the Authors
About the Reviewer
Preface
Index

Concept of POJO-based development


A POJO is simply a Java object that does not implement any infrastructure framework-specific interfaces. The POJO-based development model is all about using Plain Old Java objects for designing and developing applications and concentrating on business logic, without worrying about external dependency, such as adding code to POJO for transaction handling, dealing with message queues and connections in the case of JMS (Java Message Service) applications, and so on. The POJO programming model enables you to unit test the code without requiring an external dependency like an EJB container or an application server, making the whole programming experience simplified.

Once you start creating applications comprised of POJO, the next thing you need to determine is how you would assemble the application out of these POJOs in a loosely coupled and consistent manner, as ultimately your goal is to run your application in J2SE or a Java EE environment. If you are planning to deploy your application in Java EE environment, you will also want to leverage container capabilities like distributed transaction management, persistence support, or JMS support. For your unit testing, you will want to run POJO without these external container dependencies. In short, we want various services to be applied to POJO in a consistent manner, so it can work in any environment. This is where the Spring framework comes in, whose aim is to provide a consistent programming model for POJO-based development, apply various services to POJO transparently, and to enable enterprise application development using POJO.

Two of the most important features you need to be aware of before understanding the Spring framework are IoC and AOP.

Note

Note that the Spring framework offers many more capabilities than IoC and AOP.