Re: Few questions about REST

Hi,

On Tue, Sep 23, 2003 at 07:06:26AM -0400, Sergey Beryozkin wrote:
> I'm asking what difference does it make to an intermediary that some
> document was *expected*  (echoDocument example) or *not expected*
> (clarification request in SOAP primer) to be returned in reply to a POSTed
> request ?
> Your answer was that in a latter case an intermediary would not be confused.
> If so, then what can it do with such (clarification) data that it can't do
> with a document echoed back ?

One thing it can do in the former case that it can't do in the latter
case is reason about security.

> > > code  early-binds a client. What is a programmimg model for accessing
> > > late-bound services ?
> >
> > Well, just look at your favourite languages' HTTP libs.
> Sorry, I was unclear, I was more concerned about code generation. With
> early-bound services, one just takes WSDL and generates the code (proxies)
> and that's it.
> With late-bound services, how far the code generation can get ? One can use
> WSDL support for HTTP GET/POST. For ex, a late-bound SOAP service would
> accept :
> 
> GET soapgateway;stockquote:sunw
> or
> POST soapgateway;buystock:sunw
> some data
> 
> Is it correct ?

See below.

> > > POST soapgateway;stockquote:sunw
> >
> > How so?  Where's the documented expectation that POST will retrieve a
> > quote?
> Yes, you're right. In a perfectly RESTful environment one would use GET.
> But I think you pointed out in an earlier mail that is not unRESTful to use
> POST instead of GET (sorry, I can't find in www-archive, so here's an
> extract):
> >Strictly, the REST uniform interface constraint only requires that the
> >interface semantics be uniform.  It doesn't require that you don't do
> >the equivalent of GET via POST.  Moreover, I don't believe any of REST's
> >other constraints disallow it.
> What am I missing here ?

That the "some data" in your "POST soapgateway;buystock:sunw" example
needs to include a uniform retrieval semantic (i.e. GET).

> I guess one reason for using POST to get quotes from a late-bound doc style
> SOAP service would be to be able to pass headers.

You're missing the point.  POST doesn't mean "retrieve", and if you
use it for that, nobody knows you're doing so, and you're therefore not
using late-binding.  If you want to use POST RESTfully, your only option
is to tunnel GET via POST as I just described - and while *technically*
RESTful, you're going to have an awful lot of problems deploying it in
large scale because you're basically building a new stack that you have
to convince people to adopt (i.e. convince firewall maintainers and
vendors to look into your http-over-http solution).

Mark.
-- 
Mark Baker.   Ottawa, Ontario, CANADA.        http://www.markbaker.ca

Received on Tuesday, 23 September 2003 10:31:31 UTC