Re: REST, uniformity and semantics

Mark Baker writes:

> > I'm not a WSDL expert, but roughly the 
> > right way to do this IMO is for the operation to indicate "The 
WebMethod 
> > feature is never required for this operation, but when used in a 
context 
> > where the WebMethod feature is supported, this operation should be 
modeled 
> > as GET". HTTP bindings generically should be known to support 
WebMethod, 
> > so the right thing should happen.
> 
> I don't think there's any workable way to reconcile WSDL operations
> with the WebMethod feature, since both are describing the same beast
> (a request semantic asked by one application layer entity, of another
> application layer entity).  How could one make sense of WebMethod=
> "GET_STOCK_QUOTE" (for, say, a stock quote application protocol) and
> wsdl:operation="getWeatherReport" describing the same service?  It's
> non-sensical.


I'm confused.  You refer to WebMethod="GET_STOCK_QUOTE", but the SOAP Web 
Method feature [1] doesn't do that.  It specifies a choice of two fixed 
values {POST, GET}, with the implication that other HTTP methods such as 
PUT or DELETE might be useable if supported by the binding.

It seems perfectly consistent to me to use this with WSDL.  The WSDL can 
specify a WebMethod of GET, which tells the node how to represent the 
request (in the URI and using HTTP GET.)  The WSDL can further indicate 
that the particular method is, for example, get stock quote.  It can name 
the arguments as a company name (string) and a day for the quote (date 
type).  This can drive a convention for encoding the query in the URI. 
Furthermore, it allows the semi-automatic preparation of source code that 
requests and accepts a stock quote, as opposed to a weather report.  You 
can't do that only knowing that WebMethod=GET. 

Does that make sense?  Thanks.

Noah

[1] http://www.w3.org/TR/2003/PR-soap12-part2-20030507/#WebMethodFeature

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------

Received on Monday, 19 May 2003 22:20:11 UTC