Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to decide on what framework to use in Java Web Service?(SOAP)

I am fairly new in Java EE web service. Right now we have a project to create an API web service that connects to a database and do some retrieve and write functions.

I've heard about the following:

  • Axis
  • Struts
  • Spring

Can someone please enlighten me as to what framework is applicable for the said project? I've tried Google of course but I need opinion on people who have experience on the said framework. BTW we are going to create a SOAP web service. Additional tips are also appreciated.

like image 620
Deus Levin Avatar asked Aug 12 '15 08:08

Deus Levin


1 Answers

Note that Java has the JAX-WS API which is a technology for building web services and clients that communicate using XML. In JAX-WS, a web service operation invocation is represented by an XML-based protocol, such as SOAP.

From the frameworks you mentioned, Spring brings SpringWS which you can use to build a SOAP web service.

However i don't know about Struts 2 core api offering any SOAP capabilities. But it can be extend with other plugins that handle SOAP.

Axis (use the latest, Axis 2) is a good choice for SOAP. It is a Web Services / SOAP / WSDL engine. It also has some support for the Spring Framework.

There is also Apache CXF. It is the most widely used Web Services Standard Now; Improvement over AXIS2, which is now gradually being replaced by Apache CXF

If you need help deciding between them, read this comparison (Apache CXF vs. Apache AXIS vs. Spring WS) for the pros and cons.

There's also this great answer about cxf and axis 2.

like image 50
Laurentiu L. Avatar answered Nov 14 '22 18:11

Laurentiu L.