We should start with what the concept of web services was created for. By the time this concept appeared, there were already technologies in the world that allowed applications
JAX-RS is just an API
The RESTful API can be implemented in Java in a number of ways: you can use Spring, JAX-RS, or just write your own servlets if you’re good and brave enough.
Working with JAX-WS Web Services
Numerous platforms are available on the market for developing web services based on the Java platform. However, most of these platforms conform to the JAX-WS specification (JSR-000224).