RESTful Web Service
- REST stands for Represntational State Transfer (REST).
- RESTful web service can return the response in various format e.g. XML ,JSON and HTML.
- Request processing of RESTful web service is much faster than processing request in SOAP web service.because in case of RESTful web service you need to less parsing.
- RESTFul messages consume less bandwidth than SOAP messages for the same type of operation.
- JAX-RS is the java API for RESTful web services.
- REST is more preferred than SOAP.
SOAP Web Service
- SOAP Stands for Simple Object Access Protocol (SOAP).
- SOAP web service will always return the response in XML format.
- Request processing of SOAP web service is slower than processing request in RESTful web service due to parsing.
- SOAP messages consume more bandwidth than RESTFul messages for the same type of operation.
- JAX-WS is the java API for SOAP web services.
- SOAP is less preferred than REST.