SOAP Vs REST
SOAP Vs REST
a more rigid set of messaging patterns than REST. The rules in SOAP are
and is naturally more flexible. Both SOAP and REST rely on well-
of exchanging information.
they rely on binary messaging. The XML messaging that SOAP employs
you need for a particular task. For example, when using a public web
service that’s freely available to everyone, you really don’t have much
The XML used to make requests and receive responses in SOAP can
shortcuts that SOAP provides. They can help you reduce the effort
required to create the request and to parse the response. In fact, when
working with .NET languages, you never even see the XML.
of how the web service works, so that when you create a reference to it,
the IDE can completely automate the process. So, the difficulty of using
information that you can use to fix the problem. Given that you might
not own the Web service, this particular feature is extremely important;
otherwise you would be left guessing as to why things didn’t work. The
over Simple Mail Transfer Protocol (SMTP) and there isn’t any reason
SOAP cumbersome and hard to use. For example, working with SOAP in
information, but most web services using REST rely exclusively on using
the URL approach. REST can use four different HTTP 1.1 verbs (GET,
Unlike SOAP, REST doesn’t have to use XML to provide the response.
You can find REST-based web services that output the data in
you need, in a form that’s easy to parse within the language you’re
Unless you plan to create your own web service, the decision of which
protocol to use may already be made for you. Extremely few web
often centers on which web service best meets your needs, rather than
Soap Advantages
of HTTP)
• Standardized
standards
REST is easier to use for the most part and is more flexible. It has the
• No expensive tools require to interact with the web service
• Efficient (SOAP uses XML for all messages, REST can use smaller
message formats)