Tags: wsdl
June 10th, 2007
WADL, REST and WSDL
Published on June 10th, 2007 @ 09:49:24 pm , using 363 words, 12158 views
Paul kindly pointed to a blog entry about WADL use in REST, (WADL definition is found here). The Blog entry was interesting to read.
I want to quickly explain that WADL is meant to describe the possible interactions with a Web Application. Thus, it has methods, but those are HTTP commads, and it also describes the query variables (like the fields in a form) that the method needs to send to the web application. Finally, it describes the expected response.
Now, in the blog I see some misconceptions. First, it relates SOAP and WSDL to XML-RPC. That may seem true due to actual use of those two, but SOAP is just a wrapper and WSDL does not enforce XML-RPC, using document/style it reassembles a simply document sending paradigm. By the way, XML-RPC and WS used to do RPC are two completely different things.
Second, the REST based Service concept is defined to encompass even static web pages. May REST style architecture handle resources in the web, and REST “style” Services are services implemented using the REST underlying paradigm. But Static pages are not Services.
Third, WADL is at implementation level of the HTTP call, thus it does not define the service, just what to call and what to expect in response. That is not bad, it is actually good, but then WADL describes an HTTP interaction, while WSDL describes a messaging interaction. Although not actually standardized, WSDL may allow you to send messages using a message queue, SMTP, or any other transport.
Now, I want to explain my vote. I’m not a WSDL lover, I think it may be improved. Still, I’m carefull to compare, it is not as easy. We cannot say WADL is a description document for REST based Services and WSDL for RPC based ones. Right?
I may want to go even further. I may say REST Style Services may actually make use of both! Yes, while WSDL describes your Service at message level, defining the document and port, and a WADL that makes clearer the HTTP interaction (since WSDL inly indicates you are using HTTP as a transport).
Again, what do you think?
William Martinez Pomares.
June 7th, 2007
A RESTFull WSDL?
Published on June 7th, 2007 @ 04:25:35 pm , using 791 words, 2979 views
I a recent comment, Paul mentions he is not familiar with the Document Style concept. This is a great opportunity to touch the theme and clarify some ideas about WSDL and the WSA idea of a service.
WSDL is meant to describe the service definition and interaction models. WSDL defines:
- The Service’s visible endpoint. That is, the address where the port of the service leaves.
- The Binding. That is, which transport to use and how.
- The Operations. Each operation with a name and a message flow (a named message inbound or outbound).
- The Messages. Each named message has a number of named parts that conform the payload.
- The Parts. Each one is defined either by indicating the primitive type or a schema defined xml.
- The Schema. A Types section that is defined using an XML schemas.
Using the above sections, we can define the service by indicating the port, the available operations, which message flow each operation has, and what is the structure of each message.
With the WSDL, the client is able to know how to construct the message and where to send it. So far so good for our service notion.
The problem comes when WSA came out with the style/encoding idea. SOAP was originally created to access Objects remotely (Simple Object Access Protocol). Here is the story.
Those were the times when RPC was the idea of remote access. So, SOAP was created a requirement for the body of the message. It had to be constructed with a fixed structure, where the root element’s name should be the same as the method name. The children elements should be one per parameter, and each one containing the type as an attribute. That structure was known as the encoding.


