Reputation: 10395
Spring Framework provides many technologies for applications to communicate with each other over HTTP.
What are the differences among them? What criteria dictate which one to choose?
Upvotes: 1
Views: 1562
Reputation: 7858
JAX-WS is a standard maintained by the JCP (Java Community Process) and every full featured application server implements it (or, at least, provides an implementation for it). It's easy to use (you just need a few annotations in your service class endpoint) and you don't need to worry about the implementation (and your application will carry less dependencies within it).
Spring-WS was widespread when JAX-WS was a work-in-progress (or didn't ever existed). It achieves the same that JAX-WS but it's a bit more cumbersome. From my experience it's loosing adepts in the benefit of the latter.
HTTP based services (as HTTP invoker and REST) claim to be a bit more lightweight than JAX-WS (because the endpoints don't need to handle the SOAP envelope) but are not as strong-typed as WSDL based ones.
When I have to choose I usually decide for JAX-WS if there is not a strong reason for the REST based approach. I don't like at all the HTTP Invoker one because it's security issues (even though when talking about intranets), but I think this is a kind of personal choice.
Upvotes: 1
Reputation: 4915
If you are integrating your own apps and you have tight control over application client and wire (e.g.corporate intranet) then use HTTP Invoker - it's really transparent to application and easy to setup. Http invoker over Internet with non reliable client authentication (without PKI auth) may be not good idea, there are security problems with java serialization used in invoker.
If invoker doesn't suit you well, and it's your own apps - then consider REST.
I think WSDL based services are good for external integration - you can define protocol with strict rules.
Upvotes: 1