Hi
Here's my short answer:
Although Axis2 supports JAX-WS standard, it has many
proprietary quirks you have to deal with. Axis2 is an attempt to modernize Axis1 - it has developed it's own Object Model (OMElements), it's own deployment descriptors, generators, etc. The most important aspect of Axis2 (from the developer's/deployer's perspective) is that it is a Web Application (WAR) on it's own and web services are deployed into WEB-INF/services directory as AAR archives. Without judging this approach, I can say that this introduces many problems with testing, packaging (Maven), deploying, upgrading and versioning.
My real-life problems with Axis2 were:
- accessing JNDI datasources (two or more AARs had the same jndi resource name)
- logging (logj/logback) configuration
- classloaders (Axis2 has it's own WEB-INF/lib/*.jars and AARs have their own JARs)
- testing without Axis2 servlet running
- reading generated service skeleton classes (aah! my eyes!)
The advantage of Axis2 is that it gives you access to several modules (MARs): WS-Security, WS-RM, ... but the same you can find in CXF.
Generally you should not decide between Axis2 and Spring-WS, but between CXF and Spring-WS and the latter is the choice between sticking (generally) to JAX-WS 2 API and Spring's clean and elegant approach to contract-first web services.
I won't give you comparison between Spring-WS and CXF. I'll just give you advantages of Spring-WS:
- very (very, very, very, very ^100) clean API, model and configuration of WebServices
- very thin layer of the core webservices (by the term I mean the code which is invoked after receipt of SOAP message and invocation of your code)
- very clean mapping of SOAP messages to methods (WS-Addressing with @Action, SOAP mapping with @SoapAction, @PayloadMapping, ...)
- what's very important is that the general flow of WebService message handling is analogous to the way HttpServletRequests are routed to your Controller classes in Spring MVC.
- lack of dedicated "SpringWS web application" - it's just ordinary servlet or (even) ordinary SpringMVC controller.
- very easy and clean way of mixing WebService endpoints and SpringMVC controllers (when you want to WebService-enable your existing SpringMVC application)
- very easy unit/integration testing
- no generated code
- no generated, unreadable deployment descriptors
- use of different XML marshalling libraries (Axis2 does that too)
So - if you want clean and elegant solution (if you're sensitive to that aspect of development), choose SpringWS. If you like JAX-WS API, choose CXF, if you want problems with debugging weird behaviors - choose Axis2.
regards
Grzegorz Grzybek