What is the right choice for creating a web service using Axis2 - AXIOM, JAXB, ADB or XMLBeans

Axis2 supports the creation of web services using AXIOM, JAXB, ADB, and XMLBeans. I am new to this area of ​​web service development and want to create a web service using Axis2. The web service will be very simple, but I expect it to change quite often. I felt that AXIOM is good, as it allows you to specify your service requirements in the service.xml file and then creates it for you. So I thought it would make my life easier, because in the future for any changes in my web service I only need to change the service.xml file and some code using the .java classes for web services. But other methods also have their advantages. Given my requirements, can you tell me which method I should adopt when creating a web service? Note. I would like to expand support for both REST and SOAP web services.

+6
java web-services jaxb axis2 axiom
source share
1 answer

I will start by recognizing my prejudice that I am leading the implementation of MOXy JAXB, which brings me to my first point.

1. There are several JAXB implementations

Since JAXB is a standard ( JSR-222 ), there are several implementations: Metro (reference implementation), EclipseLink MOXy , Apache JaxMe , etc. If you hit a stop show error in one implementation, you can try another.

2. JAXB is the standard middleware for JAX-RS (RESTful Web Services) and JAX-WS (SOAP Web Services)

JAXB was developed in conjunction with JAX-WS, and JAX-RS was written to use JAXB. JAXB is supported on all Java EE 5 and Java EE 6 application servers.

3. JAXB supports Java 5 features such as generics and enums

This may or may not be a big problem for you, but JAXB supports generics and enums, while XML Beans does not.

4. Separate implementations have very useful extensions.

For example, MOXy has extensions for mapping based on XPath, an XML metadata file, and extensions for displaying JPA objects:

+7
source share

All Articles