views:

232

answers:

6

I'm having trouble understanding why a WSDL would be so beneficial, when the truth is that the service definition is not that human-readable, and most developers will use automated tools to consume it to generate objects in the application. Why isn't it easier for a service provider to define a simple XML schema, and just tell me in the documentation what I can get and how I can get it? I understand the whole "universal definition" aspect, but it all just seems so overcomplicated to me. Most APIs for social sites use a basic RESTful architecture, and all they do is give you a schema representation of the data you will get back. Seriously, I must be missing something here.

+5  A: 

So what "simple XML schema" would you propose that would let the tools give the same level of code generation support that they do now?

I think the WSDL designers would argue that they're already giving the simplest schema they could which exposed everything they needed to. I'm not saying I'd necessarily agree, but being able to autogenerate clients is very powerful.

Jon Skeet
+2  A: 

At one time, WSDL was popular and I'm sure for internal tools for many companies (and large SOA systems), WSDL is still in use. But you're correct, the adoption of REST has taken WSDL off the map a bit once it "hit the scene".

Take for example Amazon S3. They offer a WSDL along with the REST API. I had read somewhere that 98% of S3 users are using the REST API and Amazon is considering dropping the WSDL support.

REST is clean. WSDL often depends on other tools to parse it out, or to automatically build functions for your application to benefit from the services offered by the WSDL. REST also has the benefit of being much more natural by taking advantage of HTTP and not really relying on anything more. One you get SOAP into the mix and the many other acronyms that go along with WSDL, you end up with a lot on your hands....

mwilliams
I would say that REST and WSDL/SOAP-like services have different usage / areas where they differ in strength.
Torbjørn
Very much agreed.
mwilliams
A: 

WSDL is XML representation file and a communication standard for any external system to communicate with your webservice regardless its implementation technologies or platforms. FYI, RESTful services can use a definition language file called WADL to describe the service as well. So, it's not about webservices only.

mnour
+1  A: 

This link should help you out.

http://www.prescod.net/rest/rest_vs_soap_overview/

This is a great resource to help those who do not understand the SOAP vs REST contention. They are different tools. Use them so that you solve your problem in the most efficient way.

mugafuga
+1  A: 

To me WSDL seems like another example of over-engineered "onion architecture", like original Java EJBs. Lots of layers and tears.

Maglob
+1  A: 

For one thing, WSDL is what the automated tools use to generate objects. And it already is a pretty simple XML format, but I'm beginning to believe that a tool that makes it easy to write XML won't ever exist. I don't think anybody is saying it's a better protocol than REST, but it came out first, has great tool support (Visual Studio completely it abstracts away when creating and consuming services), and it's a standard so it will probably stay popular for a while.

Dan Goldstein