Little Bird
Little Bird

Reputation: 91

How CXF and spring support each other

This is not a problem with a solid answer. Any answer of any level of experience would be highly appreciated. I think many new comer to java web-service might have such problems.

The main problems are:

Upvotes: 2

Views: 118

Answers (2)

Michael Hoffman
Michael Hoffman

Reputation: 454

In response to your first question, CXF has the foundational component of a bus. The bus is simply a registry of components. If you leverage Spring for your CXF web services, this bus will register up components through the Spring application context. CXF also uses a servlet transport that will act similar in nature to the Spring MVC controller by loading the Spring context for you. You can certainly publish your CXF service endpoints without Spring. Check the CXF documentation on Servlet Transport for more details on how.

As mentioned above, CXF implements JAX-RS. There are some parts of the specification on the client side that were not fully supported by CXF version 2.x, so I would recommend to use CXF version 3.x if you plan to implement JAX-RS web services. As CXF implements the pipes and filters pattern, it is certainly a different implementation than Spring MVC; however, at the end of the day, I feel you can be successful implementing RESTful service development with either approach.

I could not tell you which framework is more popular. It really depends on your requirements.

Upvotes: 0

Denis Borovikov
Denis Borovikov

Reputation: 747

How CXF and spring support each other ?

CXF has good integration with spring

Are they same in terms of their principles?

Yes, their very similar in principles. Main difference is that CXF implements JAX-RS but spring mvc has own API.

Which is the most popular framework to build web-service currently?

I think it is CXF. It supports many features like security, policy, contract-first, contract-last, etc. and mature.

Upvotes: 1

Related Questions