- From: Christopher B Ferris <chrisfer@us.ibm.com>
- Date: Thu, 5 Jun 2003 12:24:42 -0400
- To: WS-Description WG <www-ws-desc@w3.org>
Jacek, Interesting point. Of course, just a subtle point but the interface would actually be: interface HTTP { HTTPHeaders head(URI, HTTPHeaders) throws HTTPStatus; HTTPMessage get(URI, HTTPHeaders) throws HTTPStatus; HTTPMessage post(URI, HTTPMessage) throws HTTPStatus; HTTPMessage put(URI, HTTPMessage) throws HTTPStatus; } HTTPMessage := HTTPHeaders + MIMEContent since HTTP header fields, even though they look like MIME headers, are not MIME headers:) It also raises the question of operation overloading, esp w/r/t POST if the arguments are to be strongly typed. One can envisage a POST that accepts two different types of content and based on the type of the argument, the result might be different, etc. Cheers, Christopher Ferris STSM, Emerging e-business Industry Architecture email: chrisfer@us.ibm.com phone: +1 508 234 3624 Jacek Kopecky wrote on 06/05/2003 10:39:06 AM: > > Hi all, > > I've been vaguely following the discussion on issue 64 [1] and this > thought occurred to me: > > HTTP (and other application protocols) defines an interface, something > like: > > interface HTTP { > MIMEHeaders head(URI, MIMEHeaders); > MIMEMessage get(URI, MIMEHeaders); > MIMEMessage post(URI, MIMEMessage); > MIMEMessage put(URI, MIMEMessage); > } > MIMEMessage := MIMEHeaders + MIMEContent > > This maps to a WSDL interface with four operations and MIME stuff as > parameter and return value types. > > Now what everybody seems to expect to do is restricting this interface > and still presenting it as HTTP - in other words adding strong typing: > > interface StockQuoteResource restricts HTTP { > MIMEHeaders head(URI, MIMEHeaders); > StockQuoteMessage get(URI, MIMEHeaders); > // post and put not redefined as they will not be permitted anyway > } > StockQuoteMessage := MIMEHeaders + XML Schema element StockQuote > > If that's correct, we may need to add the ability to actually redefine > (and maybe hide) parent interface's methods in a new interface. That > feels like building a full object-oriented IDL language. > > If, on the other hand, REST's uniform interface principle means we > shouldn't restrict it, we won't be able to describe a StockQuoteResource > in WSDL and every HTTP resource described in WSDL would implement the > above-mentioned HTTP interface. > > Personally, I would expect to be able to have a strongly-typed > description of my HTTP resources so that, while a browser would use the > full HTTP interface, programs could use an interface with more semantics > to it. But I can't think now of any simple way to have a strongly typed > WSDL interface that still shows its relation to the HTTP > application-protocol interface. > > Does this make any sense? 8-) > > Jacek Kopecky > > Senior Architect > Systinet Corporation > http://www.systinet.com/ > > [1] http://www.w3.org/2002/ws/desc/2/06/issues.html#x64 >
Received on Thursday, 5 June 2003 12:24:56 UTC