REST vs SOAP
- SOAP - “Simple Object Access Protocol”. Rest - Representational state transfer
- SOAP is a xml-based message protocol. REST is an architectural style protocol.
- SOAP usages WSDL for communication between consumer & provider. REST uses XML or JSON to send or receive data,
- SOAP invokes services by calling RPC method. REST simply calls services via URL path.
- SOAP doesn’t return human readable result. REST’s result is readable which is just plain xml or json.
- SOAP: Transfer is over HTTP. Also uses other protocols such as SMTP, FTP etc. REST: Transfer is over HTTP only.
- Javascript can call SOAP, but it is difficult to implement. REST is easy to call from javascript.
- SOAP: Performance is not great compared to REST.
Rest Soap | Java Tutorial