April 14, 2020
Estimated Post Reading Time ~

Understanding the difference between Soap and Restful Web Services

A web service is the ability of a client application to invoke a service on a remote computer and get back data. There are two types of web services:
  • Soap web service
  • Rest web service
Soap web service: A soap web service exposes a web service definition language (WSDL) document. Using a programming language like Java, you can create proxy objects that consume operations exposed by the web service’s SOAP stack. By creating a Java proxy object, your Java application can exchange the following messages with a soap web service:

Soap request: sent to the web service by a client application requesting an action.
Soap response: Sent to a client application by the web service after a SOAP request is processed.


A benefit of using web services is that you can create a client application in a development environment that supports SOAP. A client application is not bound to a specific development environment or programming language. For example, you can create a client application using Microsoft Visual Studio .NET and C# as the programming language. Likewise, you can create a client application using Java.

To read an article on AEM and SOAP - see https://aem4beginner.blogspot.com/2020/04/creating-aem-html-template-language_95.html

To read an article about creating an AEM HTL component that invokes a 3rd party SOAP web service and displays the result set sees https://aem4beginner.blogspot.com/2020/04/creating-aem-html-template-language_95.html

Restful web services: A restful web service is the explicit use of HTTP methods. A restful web service is more lightweight as opposed to a soap web service. As a result, invoking a restful web service operation is normally faster than invoking a soap web service operation. You do not need to create Java proxy classes to invoke a restful web service. 

You can invoke a restful web service using almost any tool, leading to lower bandwidth and shorter learning curve. For example, you can invoke a restful web service using Java classes located in the org.apache.http package.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.