views:

75

answers:

4

How do I simply understand wsdl's? Seems very complicated. How is it related to soap? Where does rest fit in all these? Please give examples.

+1  A: 

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.

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.

duffymo
-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
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
+1  A: 

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

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.

John Saunders
+3  A: 

A WSDL is an XML document that describes a web service. It actually stands for Web Services Description Language.

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. Here's an article for more info on it: http://www.practicalecommerce.com/blogs/post/103-REST-Architecture

keith_c
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
added it in, all better :-)
keith_c
A: 

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 javadoc is to a java library.

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

Michael Burrows