SOAP defines a standard communication protocol specification (rule set) for XML-based messaging. SOAP uses various transport protocols such as HTTP and SMTP. The standard HTTP protocol simplifies SOAP modeling for tunneling between firewalls and proxies without any changes to the SOAP protocol.
REST describes a set of architectural principles by which data can be transmitted over a standardized interface (for example, HTTP). REST does not contain an additional layer of messaging and focuses on design rules for creating stateless services. The client can access the resource using a unique URI, and a representation of the resource is returned. With each presentation of a new resource, the client is said to pass state. When accessing RESTful resources with the HTTP protocol, the URL of the resource is the identifier of the resource, and GET, PUT, DELETE, POST and HEAD are standard HTTP operations that must be performed on this resource.
This can be done through jQuery.
JQuery example for language id:
$.post('https://services.open.xerox.com/RestOp/LanguageIdentifier/GetLanguageForString', {'document' : 'This is a sample'}, function (data) { var res = 'Not found'; if (data != null) { res = data; } });
Further reading: https://spring.io/guides/gs/consuming-rest-jquery/
source share