PauMB85 / server-cxf-spring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

server-cxf-spring

Build Status

This project works with Apache CXF framework. It's an example that create a simple web service. We build, in the same project, a WS with Soap, Restful and Spring.

Book Service.png

Table of Contents

  1. Overview
  2. Built
  3. Deploy
  4. How to use
  5. Versioning

Overview

This project tech you how to configure a Web Service with CXF framework, where you can build a SOAP and Rest services in the same project.

Built

To built it, you must download the zip or clone the project. In the directory of the pom file launch the following maven command line

mvn clean install

Deploy

To deploy the war file, you must use with your favorite server, for example a tomcat. Copy the war file into the webapp folder in you tomcat directory

cp target/server-cxf.wat /directory/to/tomcat/webapps

move to your bin directory from your tomcat and deploy the war file

./startup.sh

and the application is running on url http://localhost:8080/server-cxf

How to use

In this example project, you can test the SOAP and Rest service with the Book Service. With this service, you can create, get one or all books that you have created. You can test the rest service with this json

{
	"title": "My Book",
	"editorial": "My editorial",
	"author": "My author"
}

or xml

<book>
	<title>My Book 2</title>
	<editorial>My editorial</editorial>
	<author>My author</author>	
</book>

Versioning

We use following:

v<Major>.<Minor>.<Path/Upgrade>.<BuildNumber>
  • Major. The major version is a definite release of the product. It increased when there are a significant changes in the functionality.
  • Minor. The minor version is incremented when there are new features.
  • Path. the patch version is incremented when fix a critical bug or a collection of issues.
  • Build Number. This auto-increment with each release build in the CI system or when update the version of any framework or library.

For the version availables, you can see the tags on the repository.