Before I get into the details of Apache CXF, this section presents a simple, yet complete, example of a RESTful web service built with Apache CXF. Specifically it includes the following technologies:
- ApacheCXF's Servlet that translates requests to specific URIs to specific method invocations
- Spring to implement the service
- JAXB to perform the XML binding
- XSD to represent the communication “contract” that the service exposes; also used by JAXB to generate model classes for the service
- Maven as the build / project lifecycle management tool
The process for building an Apache CXF RESTful web service can be summarized as follows:
Read more: InformIT
- Create a new Maven web application
- Update the POM file to include the ApacheCXF JAX-RS library, which in turn includes all of its dependencies
- Update the POM to include any other dependencies, such as Spring
- Update the web application's web.xml file to define the CXFServlet and map all (or some, depending on your application) requests to it
- Configure Spring in the web.xml file to load an application context XML file
Read more: InformIT
0 comments:
Post a Comment