My friend asked to explain me what's the difference between Spring, axis2 and Jersey. Here I listed down a few differences that I'm aware of. Please comment/respond if you know more differences
Spring webservices:
- A java web application with a servlet configured in
web.xml(org.springframework.ws.transport.http.MessageDispatcherServlet).- You can use spring annotated POJOs for creating web services
- Supports both RESTful and SOAP based web services.
- Since it’s a web application you can use http authentication mechanisms
for enabling securityAxis2:
- The webservice application is a .aar file that will be deployed in
axis2.war- Use AXIOM for using non-primitive type arguments to web service calls
- You can use JSR181 annotations to create webservices
- You can use spring-dependency injection using axis2 extensions.
- Supports both RESTful and SOAP based web services.
- I guess you have to use ws-security implementation for
providing security
to your web services>- They claim hot deployment of webservices works but I haven’t seen
it working.Jersey:
- A regular web application with a servlet configured in web.xml.
- Write custom message readers/writers for using
non-primitive type arguments to web
service calls- Since it’s a web application you can use http authentication mechanisms
for enabling security- Supports only RESTful implementation of web services
- I have seen hot deployment working may be because it’s a web application
and the container can do hot
deployment
Best Answer
I'm not familiar with Jersey and Axis, but I can tell you something about Spring-WS.
You cannot use Spring-WS for restful webservices. Spring-WS is intended to be used for contract first webservices. You can however use the features of Spring 3.x and Spring-MVC for REST services. As for authorization, you can easily wire in any sort of security (with Spring-Security for instance).
I'm a big fan of the 'automatic' (de) marshalling features of Spring-WS. Just annotate your methods with the correct types and it'll know what to do.