Which structure is better than CXF or Spring-WS?

Am I researching / comparing CXF and Spring-WS for web services? I need to work as a provider and a WS consumer. In a nutshell, I was told that Spring -WS is more configurable, but CXF is easier to get up and running. This question is subjective, but will help me in my research.

  • What is your experience with any of these frameworks?
  • Have you encountered any pitfalls with any card?
  • Did you find any useful features provided either that may not have been provided to others?
+74
java spring-ws web-services cxf
Nov 17 '08 at 21:37
source share
7 answers

I think the biggest difference is Spring -WS is only “contract-first”, while I believe that CXF is usually “contract-last”.

http://static.springsource.org/spring-ws/sites/1.5/reference/html/why-contract-first.html

The last contract starts with Java code, so it is usually easier to get started with it.

However, the resulting WSDL tends to be more fragile.

+20
Nov 17 '08 at 21:45
source share

About Apache CXF:

  • CXF supports several standards, including SOAP, WSI Base Profile, WSDL, WS-Addressing, WS-Policy, WS-ReliableMessaging, WS-Security, WS-SecurityPolicy and WS-SecureConversation.
  • Apache CXF offers both the last-contract (starting with Java) and the Contract-first approach (starting with WSDL).
  • Apache CXF implements JAX-WS and JAX-RS.

About Spring WS:

  • Spring WS offers a "only" contract - first, starting with the XSD schema.
  • Spring WS supports SOAP, WS-Security, WS-Addressing.

So, in the end, I see Spring WS as a minimal web services framework, but I believe that it does not (in my opinion) have any advantages over Apache CXF (which integrates extremely well with Spring). Between the two, I would take Apache CXF.

+72
Jul 03 2018-10-17T00:
source share

CXF in no way prevents you from getting started with a contract (WSDL). I used both of these products to create a web service.

In CXF, I used Maven and the Maven plugin, naming the wsimport target to create the SEI (interface), which I then implemented. After implementing an interface that contains the actual maintenance logic and configuration of my bean beans.xml implementation, I then allow Maven to pack it into a military file for deployment. The whole exercise could not be simpler.

I don't think Spring -WS offers any benefits that outweigh the lack of JAX-WS. CXF already allows you to use Spring to connect your beans, and also has a full JAX-WS implementation.

+32
Dec 04 '08 at 16:48
source share

We have experience with CXF , and this is the predecessor of XFire , and I can recommend it as a reliable, fast (creating and running WS) and reliable infrastructure.

Regarding the problems you may encounter with CXF, see my post https://stackoverflow.com/questions/289977/recommended-framework-for-java-web-services#290205 And I agree with toolkit that the biggest difference between structures ideologically: what is the first code (for example, an interface) or a contract (i.e. Wsdl). See here for more details:

+12
Nov 18 '08 at 6:10
source share

Apache CXF:

Key positive points:

❶ The most widely used web services Standard Now; AXIS2 enhancement that is now gradually being replaced by Apache CXF

❷ Intuitive and easy to use (less coding required compared to AXIS2)

❸ Pure separation of fronts, such as JAX-WS, from the main code

❹ Fully compatible with JAX-WS, JAX-RS and others

❺ Best performance in all available frameworks with minimal computational overhead

❻ Supports a large number of interface models

❼ Supports both JAX-WS and JAX-RS (for Restful Services)

❽ Supports JBI and SDO (not supported in AXIS2)

❾ Compatible with Spring Framework

Main problems:

❶ Does not yet support orchestration transactions and WS

❷ Does not support WSDL 2.0 yet

Spring WS:

Key positive points:

❶ Best in terms of supporting the approach to developing contract-based first web services

❷ Provides standards and best practices using Framework constraints (without going beyond this and therefore the constraint)

❸ Support for Spring annotations as well as JAX-WS

❹ Less code from a developers point of view

❺ Best alignment with the Spring technology stack (also similar to the architectural stack like Spring MVC), including Spring Security

Main problems:

❶ The smallest number of supported WS- * specifications (does not fully comply with JAX-WS)

❷ Spring offers itself as a standard, and therefore, other Java compatible frameworks support better standards support.

❸ Support only contract-based web services development model

+4
Aug 05 '15 at 15:05
source share

Another option to consider in this comparison is Enunciate .

Especially if you want to start with Java first.

+1
Nov 05 '10 at 13:10
source share

Please view the related post at: Creating a Web Service with Spring -WS

0
Sep 30 '10 at 4:17
source share



All Articles