开发者

axis2 vs spring-ws vs jersey

开发者 https://www.devze.com 2023-02-22 19:51 出处:网络
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

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:

  1. A java web application with a servlet configured in web.xml(org.springframework.ws.transport.http.MessageDispatcherServlet).
  2. You can use spring annotated POJOs for creating web services
  3. Supports both RESTful and SOAP based web services.
  4. Since it’s a web application you can use http authentication mechanisms for enabling security

Axis2:

  1. The webservice application is a .aar file that will be deployed in axis2.war
  2. Use AXIOM for using non-primitive type arguments to web service calls
  3. You can use JSR181 annotations to create webservices
  4. You can use spring-dependency injection using axis2 ex开发者_如何学JAVAtensions.
  5. Supports both RESTful and SOAP based web services.
  6. I guess you have to use ws-security implementation for providing security to your web services>
  7. They claim hot deployment of webservices works but I haven’t seen it working.

Jersey:

  1. A regular web application with a servlet configured in web.xml.
  2. Write custom message readers/writers for using non-primitive type arguments to web service calls
  3. Since it’s a web application you can use http authentication mechanisms for enabling security
  4. Supports only RESTful implementation of web services
  5. I have seen hot deployment working may be because it’s a web application and the container can do hot deployment


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消