4

I have to implement SOAP based web services for a project. We are considering different options like axis2, ejb as a web service, jax-ws but not really sure about the advantages/drawbacks of these options. Can someone please help in this regard.

It would be great if someone can point to any other alternatives for implementing SOAP based webservices.

Thanks in advance, -Csn

csn
  • 376
  • 7
  • 18

2 Answers2

4

For me, the easiest way to expose a web service is creating an EJB with annotations (JAX-WS) if you are using a Java EE server like JBoss.

Consuming a WS is a bit different but I prefer JAX-WS too, because Axis2 throw exceptions if you use complex parameters (classes) and you add an attribute. JAX-WS instead calls every 'get' and 'set' for the serialized xml. If no 'set' is implemented, no problem. That's an advantage for backward compatibility.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
salidux
  • 616
  • 6
  • 3
  • have you ever used GlassFish ? it comes with buit in EJB annotations to make SOAP web services easy but i was wondering if a similar thing can be done for REST? this this post: http://stackoverflow.com/questions/12654579/glassfish-built-in-restful-ejb-interface-in-addition-to-soap – amphibient Oct 01 '12 at 16:55
2

I would highly recommend to use Apache CXF for developing SOAP web services. This stack is based on JAX-WS but has much more features. CXF has an excellent integration with Spring. There are a lot of documentation on the internet how to create web services using this framework. If I would be working on completely new web service I would definitely choose Apache CXF.

Paulius Matulionis
  • 23,085
  • 22
  • 103
  • 143
  • well somehow I will use axis2 as of now but may be later on we can switch to Apache CFX, as it does have some advantages in form of spring integration. – csn Oct 05 '12 at 12:58