You are on page 1of 7

web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

What are WSDL, SOAP and REST?


Asked 10 years, 5 months ago Active 2 years, 10 months ago Viewed 199k times

What is WSDL? How is it related to SOAP? Where does REST fit in all of that?

161 web-services rest soap wsdl

Share Follow edited Jul 16 '17 at 11:32 asked Sep 21 '10 at 21:35
dodov javaguy
60 3,935 3 23 44 4,036 10 29 35

10 Answers Active Oldest Votes

A WSDL is an XML document that describes a web service. It actually stands for Web
Services Description Language.
188
SOAP is an XML-based protocol that lets you exchange info over a particular protocol (can be
HTTP or SMTP, for example) between applications. It stands for Simple Object Access
Protocol and uses XML for its messaging format to relay the information.

REST is an architectural style of networked systems and stands for Representational State
Transfer. It's not a standard itself, but does use standards such as HTTP, URL, XML, etc.

Share Follow edited May 5 '18 at 10:14 answered Sep 21 '10 at 21:49
Senura Dissanayake keith_c
574 1 7 23 2,022 1 12 4

Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

1 of 7 3/14/21, 13:39
web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

4 I meant to put SMTP or HTTP as examples of protocols that SOAP can be used over. I didn't intend it
to mean HTTP is the only protocol that can be used (was just using it as an example). – keith_c Sep 21
'10 at 22:10

7 Representational State Transfer (REST) is an architectural style that specifies constraints, such as the
uniform interface, that if applied to a web service induce desirable properties, such as performance,
scalability, and modifiability, that enable services to work best on the Web. In REST style, data and
functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs).
The resources are acted upon by using a set of simple, well-defined operations. it follows client/server
architecture and is designed to use a stateless communication protocol,typically HTTP. – kingAm Jun 3
'15 at 12:20

4 Isn't the 'D' in WSDL stand for "Description" instead of "Definition"? – Sparkzz Oct 26 '17 at 17:30

12 "A WSDL is an XML document that describes a web service. It actually stands for
Web Services Definition Language." This really doesn't explain what it is...
– Ojonugwa Jude Ochalifu Feb 26 '18 at 9:51

2 @Sparkzz according to wikipedia: The current version of WSDL is WSDL 2.0. The meaning
of the acronym has changed from version 1.1 where the "D" stood for "Definition".
– Bochu Jun 12 '19 at 17:56

Example: In a simple terms if you have a web service of calculator.

110 WSDL: WSDL tells about the functions that you can implement or exposed to the client. For
example: add, delete, subtract and so on.

SOAP: Where as using SOAP you actually perform actions like doDelete(), doSubtract(),
doAdd(). So SOAP and WSDL are apples and oranges. We should not compare them. They
both have their own different functionality.

Why we use SOAP and WSDL: For platform independent data exchange.

EDIT: In a normal day to day life example:

WSDL: When we go to a restaurant we see the Menu Items, those are the WSDL's.

Proxy Classes: Now after seeing the Menu Items we make up our Mind (Process our mind on
what to order): So, basically we make Proxy classes based on WSDL Document.

SOAP: Then when we actually order the food based on the Menu's: Meaning we use proxy
classes to call upon the service methods which is done using SOAP. :)

Share Follow edited Dec 16 '17 at 2:15 answered Jul 5 '15 at 13:28

Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

2 of 7 3/14/21, 13:39
web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

Every time someone mentions SOAP/WSDL, I think of objects and classes defined in xml...

40 "You use SOAP just the same way that you would any PHP class. However, in this
case the class does not exist in the local applications file system, but at a remote site
accessed over http." ... "If we think of using a SOAP service as just another PHP
class then the WSDL document is a list of all the available class methods and
properties. "

http://www.doublehops.com/2009/07/07/quick-tutorial-on-getting-started-with-soap-in-
php/comment-page-1/

..and whenever someone talks about REST I think of HTTP's commands (request methods)
like POST, GET and DELETE

Share Follow edited Jun 20 '20 at 9:12 answered Aug 1 '14 at 22:09
Community ♦ angelcool.net
1 1 2,359 1 21 25

Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

3 of 7 3/14/21, 13:39
web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

SOAP -> SOAP(Simple object access protocal) is the application level protocal created for
machine to machine interaction. Protocol defines standard rules. All the parties who are using
19 the particular protocol should adhere to the protocol rules. Like TCP, It unwinds at transport
layer, The SOAP protocol will be understood by Application layer( any application which
supports SOAP - Axis2, .Net).

WSDL -> SOAP message consist of SoapEnevelope->SoapHeader and SoapBody. It doesn't


define what would be message format? what are all the transports(HTTP,JMS) it supports?
without this info, It is hard for any client who wants to consume the particular web service to
construct the SOAP message. Even if they do, they won't be sure, it'll work all the time. WSDL
is the rescue. WSDL (Web Service description Language) defines the operations, message
formats and transport details for the SOAP message.

REST -> REST(Representational state transfer) is based on the Transport. Unlike SOAP
which targets the actions, REST concerns more on the resources. REST locates the
resources by using URL (example -http://{serverAddress}/employees/employeeNumber
/12345) and it depends on the transport protocol( with HTTP - GET,POST, PUT, DELETE,...)
for the actions to be performed on the resources. The REST service locates the resource
based on the URL and perform the action based on the transport action verb. It is more of
architectural style and conventions based.

Share Follow answered Oct 11 '15 at 4:33


Raj kannan Iyyappan
615 8 9

You're not going to "simply" understand something complex.

16 WSDL is an XML-based language for describing a web service. It describes the messages,
operations, and network transport information used by the service. These web services usually
use SOAP, but may use other protocols.

A WSDL is readable by a program, and so may be used to generate all, or part of the client
code necessary to call the web service. This is what it means to call SOAP-based web
services "self-describing".

REST is not related to WSDL at all.

Share Follow answered Sep 21 '10 at 21:43


John Saunders
Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

4 of 7 3/14/21, 13:39
web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

SOAP stands for Simple (sic) Object Access Protocol. It was intended to be a way to do
Remote Procedure Calls to remote objects by sending XML over HTTP.
11
WSDL is Web Service Description Language. A request ending in '.wsdl' to an endpoint will
result in an XML message describing request and response that a use can expect. It descibes
the contract between service & client.

REST uses HTTP to send messages to services.

SOAP is a spec, REST is a style.

Share Follow answered Sep 21 '10 at 21:43


duffymo
291k 41 346 537

2 -1: sorry, but I disagree with associating SOAP with RPC. What about message-style services? Also,
there's no standard that says a request ending in .wsdl or ?wsdl will generate a WSDL.
– John Saunders Sep 21 '10 at 21:44

4 Are you saying that you can't do RPC with SOAP? I know that might not encompass the entire
standard, but it was certainly the original motivation. As far as whether or not the WSDL URL is part of
the standard, I'll admit that you have me there. It's usually the way I see it done, but I can't cite anything
in the standard that mandates it. – duffymo Sep 21 '10 at 22:50

1 You may have been confusing the fact that SOAP was derived from XML-RPC with the idea that SOAP
was originally intended as an RPC. Yet note that WSDL, from the start, was able to describe document-
style services, in addition to RPC style services. If RPC were the original motivation behind SOAP and
WSDL, then one would expect that document-style services would have been absent from the original
standard. – John Saunders Jul 23 '11 at 22:35

Wikipedia says "The Web Services Description Language is an XML-based language that
provides a model for describing Web services". Put another way, WSDL is to a web service, as
6 javadoc is to a java library.

The really sweet thing about WSDL, though, is that software can generate a client and server
using WSDL.

Share Follow answered Sep 21 '10 at 21:53


Michael Burrows
301 1 9

Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

5 of 7 3/14/21, 13:39
web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

Some clear explanations (for SOAP and WSDL) can be found here as well.

4 Difference between a SOAP message and a WSDL?

Share Follow edited May 23 '17 at 12:34 answered Aug 7 '14 at 14:09
Community ♦ namski
1 1 41 1

REST is light-weight in terms of encoding, much more useful for light weight devices i.e. non
strict APIs.
4
REST is format independent. XML, HTML, JSON all options are available.

REST provides abilities for on 2 point message transfer (not surprising since REST stands for
REpresentational State Transfer) where WSDL/SOAP interaction is multiple point message
interaction.

REST does not require a new extension for XML messages, where in WSDL/SOAP this is the
case.

WSDL/SOAP uses multiple transport protocols, REST relies on only HTTP. Therefore
WSDL/SOAP can be used like a RESTful way, however simple requests can be overly
complicated/heavy weighted.

A simple analogy: REST is like a motoboy delivers your food easy and quick. XML extended
WSDL/SOAP more like UPS delivery, more structured and serious stuff but comes with a cost.

Share Follow answered May 16 '15 at 15:44


Bedi Egilmez
1,150 13 25

A WSDL document describes a webservice. It specifies the location of the service and the
methods of the service using these major elements: data types using in webservice data
0 elements for each operation describe the operations that can be performed and the messages
envolved

SOAP (Simple Object Access Protocol) is a messaging protocol that allows programs that run
on disparate operating systems to communicate using http and xml.

Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

6 of 7 3/14/21, 13:39
web services - What are WSDL, SOAP and REST? - Stac... https://stackoverflow.com/questions/3764681/what-are-w...

Highly active question. Earn 10 reputation in order to answer this question. The reputation requirement helps
protect this question from spam and non-answer activity.

Join Stack Overflow to learn, share knowledge, and build your career.

Sign up with email Sign up with Google Sign up with GitHub Sign up with Facebook

7 of 7 3/14/21, 13:39

You might also like