views:

289

answers:

6

I want a web service framework which is open source & free for commercial use, also security is a main concern too. Please suggest a web service framework for Java using SOAP standard.

+8  A: 

I'd suggest a JAX-WS implementation: JAX-WS RI (which is part of Metro) or Apache CXF. Both are very close from a runtime perspective but many people find that CXF has a better documentation (might be an important criteria). Both provide integration with Spring if this matters to you (actually, decent frameworks just can't ignore Spring so this is not a surprise).

Spring-WS is another option but is not JAX-WS compliant, supports only a contract-first approach (from XSD) - that's a philosophical choice - and doesn't support many WS-* standards (that you may not need though).

In any case, I'd stay away from Axis 2 and its horrible deployment architecture and packaging hell (the Axis 2 webapp itself is a container for web services which need to be packaged in specific archives). I find it totally counter productive. On top of that, it doesn't even perform really well.

Pascal Thivent
+1  A: 

Take a look at Axis. It's quite simple and easy to use. http://ws.apache.org/axis/

Kico Lobo
Axis sucks so much, I don't understand why people keep suggesting it.
Pascal Thivent
Your comment would be more valuable and relevant if you took a minute to explain why you think Axis sucks so much.
Jim Kiley
@Jim I've added details to my answer to cover this.
Pascal Thivent
A: 

I'd use the one provided with Java.

http://java.sun.com/webservices/docs/2.0/tutorial/doc/

Phil Hayward
A: 

Spring framework will be the definite winner for this kind of requirement. Spring and its modules including spring security, spring webservices makes it a right fit for this one.

Teja Kantamneni
Spring is good, but you will write a lot of code
Greg
+2  A: 

Here are the common frameworks, all are rather mature:

All support SOAP.

I've used both CXF and Spring-WS. Both are easy to configure and use.

David Rabinowitz
+1  A: 

I agree with the Spring-WS option. I've used it at various times and it quickly become my web service choice unless there are other factors that specifically rule it out.

Although this is slightly off topic, if you're in the planning stage I'd make the following recommendations.

  1. Choose a topdown approach. Spring-WS definately supports this (it is the preferred method). That way if you make changes to the underlying code you won't need to worry about accidentally updating your WSDL. Also at design time you can consider the WSDL the interface point and not go through other elaborate documents as much.

  2. Use JAXB to generate your request/response objects. This is much easier in the long run and definately helps to make sure that you are coding as required by your WSDL (quite a few times I looked at generated objects and saw that they didn't look right only to find out that I had modified the WSDL incorrectly).

  3. Use annotations in your endpoints.

Those are the main points. Good luck :-).

SOA Nerd