I want to expose some of the existing POJOs of my Spring Web application as Webservices with the help of JAX-WS annotations. I can do it in the following two ways
- Apache CXF
- Mule (开发者_JAVA技巧 this internally uses CXF)
I wanted to know which is preferable and why?
Apache CXF is a JAX-WS stack, Mule is a lightweight Enterprise Service Bus, they are not comparable. So the question is, do you need an ESB (i.e. do you need something providing a solution for transport, routing, mediation, orchestration, monitoring, etc of messages between applications)?
Given your requirements and given the fact that you're asking what to choose, my suggestion would be to keep things simple and to use Apache CXF. If the need should arise, you will be able to introduce an ESB later.
Agree with the previous answer - decide if you really need an ESB. If you do, Mule provides excellent support to do this using CXF. With the latest CXF support updated in Mule 3, a lot of work went into making it even easier when using JAX-WS annotations.
http://www.mulesoft.org/documentation/display/MULE3USER/CXF+Module
I would agree with Pascal's answer (and I've upticked it), but would add that Mule 3 has integrated support for JAX-RS and it's annotations. So if you go with CXF now and decide you want to use Mule later, your investment in tuning your REST API will be easily leveraged under Mule.
精彩评论