Difference between WSDL 2.0, WADL & XRD?
- WSDL 2.0: www.w3.org/TR/wsdl20/
- WADL www.w3.org/Submission/wadl/
- XRD www.oasis-open.org/committees/download.php/35274/xrd-1.0-wd10.html
All three can 开发者_StackOverflow社区be used a REST API descriptors. What's the differences? I know this is a heated question, but I simply want a comparison, not a flame war :P
WADL (Web Application Description Language)
WADL is a standard to describe HTTP-based web applications, typically REST web services. So WADL can be seen as a REST equivalent of WSDL 1.1.
WSDL (Web Services Description Language)
WSDL 2.0 can be used to describe REST Web services and thus competes with WADL. But it has a wider scope.
XRD (eXtensible Resource Descriptor)
Quoting this blog post from Eran Hammer-Lahav (a frequent contributor to OAuth, Discovery, XRD, and other emerging community-driven specifications and standards - and Director of Standards Development at Yahoo!):
XRD is a simple generic format for describing resources. Resource descriptor documents provide machine-readable information about resources (resource metadata) for the purpose of promoting interoperability, and assist in interacting with unknown resources that support known interfaces.
For example, a web page about an upcoming meeting can provide in its descriptor document the location of the meeting organizer’s free/busy information to potentially negotiate a different time. The descriptor for a social network profile page can identify the location of the user’s address book as well as accounts on other sites. A web service implementing an API protocol can advertise which of the protocol’s optional components are supported.
Summary
So, while WSDL 2.0 competes with WADL as REST Web Service description languages (WDL 2.0 has more but lets forget that for now), XRD is a metadata discovery format for any URI (OpenID discovery being one of the primary use case). XRD (which has its roots in the Identity community) looks different.
According to Dr. M. Elkstein in his REST tutorial,
WSDL is the Web Services Description Language. It is commonly used to spell out in detail the services offered by a SOAP server. While WSDL is flexible in service binding options (for example, services can be offered via SMTP mail servers), it did not originally support HTTP operations other than GET and POST. Since REST services often use other HTTP verbs, such as PUT and DELETE, WSDL was a poor choice for documenting REST services.
WADL is the Web Application Description Language. WADL is championed by Sun Microsystems. Like the rest of REST, WADL is lightweight, easier to understand and easier to write than WSDL. In some respects, it is not as flexible as WSDL (no binding to SMTP servers), but it is sufficient for any REST service and much less verbose.
精彩评论