How to choose between JAX-RS and JAX-WS web services implementation?
Solution 1
JAX-WS is an API for SOAP-based WS, and using it for RESTful WebServices is not the best way to go about things.
So if you're looking to implement a RESTful WebService, use JAX-RS .
Solution 2
I feel like Web services are mostly tied for UDDI
type applications. REST
is just a plain evolution to make stateless http
protocol to stateful thing by using http
method communications for doing CRUD
operations. Like mapping operations to methods GET, PUT, POST
and DELETE
.
Web Services are into coding for Airplane ticket reservation systems, Online banking, payment gateways, etc. Where there are a set of standard systems expose their API in some definitions. The JAX-RS
is for providing some light weight layer for resources...
![kgautron](https://i.stack.imgur.com/qn65B.jpg?s=256&g=1)
kgautron
Freelance software engineer. Java, Spring, REST, AngularJS, Cassandra https://fr.linkedin.com/in/kévin-gautron-254b9214
Updated on July 19, 2022Comments
-
kgautron almost 2 years
In what contexts is it better to use one over the other and why?
Thanks!
-
Janus Troelsen almost 11 yearsit looks like JAX-RS 2 is contained in JAX-WS. see jax-rs-spec.java.net/nonav/2.0/apidocs/index.html . what do I make of this?
-
To Kra over 9 yearsdont really understand your words "Normal people can not achieve such things using plain JAX-RS.."
-
Siva Tumma over 9 yearsI meant JAX-RS is not meant to solve what Web Services is used for in a full manner.
-
To Kra over 9 yearsYou should read this blog.smartbear.com/apis/understanding-soap-and-rest-basics