Skip to main content

REST VS SOAP


SOAP and REST both allow you to create your own API. API stands for Application Programming Interface. It makes it possible to transfer data from an application to other applications. An API receives requests and sends back responses through internet protocols such as HTTP, SMTP, and others. 

Many popular websites provide public APIs for their users, for example, Google Maps has a public REST API that lets you customize Google Maps with your own content. There are also many APIs that have been created by companies for internal use.

There are significant differences between SOAP and RESTful web services. The bullets below break down the features of each web service based on personal experience.

REST
  • RESTful web services are stateless. You can test this condition by restarting the server and checking if interactions survive.
  • For most servers, RESTful web services provide a good caching infrastructure over an HTTP GET method. This can improve the performance if the information the service returns is not altered frequently and is not dynamic.
  • Service producers and consumers must understand the context and content being passed along as there is no standard set of rules to describe the REST web services interface.
  • REST is useful for restricted-profile devices, such as mobile, for which the overhead of additional parameters are less (e.g., headers).
  • REST services are easy to integrate with existing websites and are exposed with XML so the HTML pages can consume the same with ease. There is little need to refactor the existing site architecture. As such, developers are more productive because they don't need to rewrite everything from scratch; instead, they just need to add on the existing functionality.
  • A REST-based implementation is simple compared to SOAP.
SOAP
  • The Web Services Description Language (WSDL) describes a common set of rules to define the messages, bindings, operations and location of the service. WSDL is akin to a contract to define the interface that the service offers.
  • SOAP requires less plumbing code than REST services design (e.g., transactions, security, coordination, addressing and trust). Most real-world applications are not simple and support complex operations, which require conversational state and contextual information to be maintained. With the SOAP approach, developers don't need to write plumbing code into the application layer.
  • SOAP web services, such as JAX-WS, are useful for asynchronous processing and invocation.
  • SOAP supports several protocols and technologies, including WSDL, XSDs and WS-Addressing.


https://searchmicroservices.techtarget.com/tip/REST-vs-SOAP-Choosing-the-best-web-service





Comments

Popular posts from this blog

SVN to GIT Migration with revision history

This blog explains the process I have followed while moving one of code branch of one of the projects to Gitlab. SVN to Git migration can be done using the git-svn command in Git.  Documentation about this command can be found from here. https://git-scm.com/docs/git-svn My Company svn repository can be accessed using two ways svn+ssh://192.168.x.x/usr/local/ svnroot/branches/PROJECT/PROJECT_BRANCH http://svn.companyName.net/repos/svnroot/branches/ PROJECT/PROJECT_BRANCH SVN to GIT migration can be done using one of the above-mentioned URLs.  Git can be installed and configured to use its inbuilt SSH client or third party ssh client ( https://6xgate.github.io/TortoisePlink/ ) First of all, this process should be run in a server where the system does not go idle. I have tried this on my PC. But when I have locked the PC, it crashes. Therefore I have tried this in one of our internal server. I have tried to get SVN revision history when the P...

Java 11 Modularity and Spring REST

I have recently started working on creating a REST API for a client project.  I was using Java 8 for my past developments. Since Java 11 was introduced in the last September  (https://en.wikipedia.org/wiki/Java_version_history) I thought of developing the REST API in Java 11. Java 11 is having major changes after Java 8. Java 11 is having a concept of modules (This was introduced after Java 9). Several libraries are acting as separate modules. Those are not included in JDK and those have to be imported separately. Ref : http://openjdk.java.net/jeps/261 (I have experienced this in JBoss7 also. They were using the module system and each service can specify which modules which are using. Those modules can be manually configured by the user.) One example is that you have to import the Java fx library separately (For GUI). Java-Fx is decoupled from JDK. <!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->   ...

President - Association of Computer Engineering Students

I was selected to be the president of ACES, Association of Computer Engineering Students, the official student body of the Department of Computer Engineering Students. ACES Site :  aces.ce.pdn.ac.lk  It was a great opportunity to work with fellow undergraduates, lecturers, senior graduates, and industry. Until now We were able to organize few events in University of Peradeniya and Colombo. This event was organized by ACES Council, a group of 14 undergraduates. The events are, ACES Hackathon - This is an inner hackathon for undergraduates in the University of Peradeniya. ACES Hackathon, held annually for the last 5 years was held from the 29th of April to the 1st of May 2016 at the Faculty of Engineering, University of Peradeniya. The Hackathon brings together undergraduates from the Faculty of Engineering and Science for 3 days to develop their creative skills to provide innovative IT solutions. This year there were 150+ participants.   www.readme.lk/saw-ac...