Re: Few questions about REST

On Fri, Sep 19, 2003 at 04:56:43AM -0400, Siarhei Biarozkin wrote:
> > > How POST in this example can be used RESTfully to
> > > see what happens after the data has been submitted ?
> 
> > Well, you just POST the data, and see what you get back.  If it's a 201,
> > then you know a new resource was created in response to your POSTed
> > data, and you can invoke GET on that.  The POST response might also just
> > contain a link someplace else, which you can invoke GET on.
> Ok, as far as a (generic) intermediary is concerned, how the response could
> be usefully handled before it's passed to an immediate requestor ?
> Probably, if it's 201, then a newly created resource could be fetched in
> advance so that it's already available by the time a request from an
> (original) client arrives, and this also would require that intermediary
> sets an URI of a newly created resource to its own one ?
> What if it's not 201, but some data, as in a response from a primer, where
> clarification request is returned after processing an initial booking
> request ? An intermediary can not predict that a clarification request will
> be or won't be returned in a POST response ; if it's returned, then how it
> can be generically processed?

Sorry, I don't understand what you're getting at, or asking there.

> I'd like also to ask about late-binding and a tool support. With WSDL R085,
> a tool can generate a set of classes for a client. It seems that
> late-binding assumes that no code generation is needed, because a generated
> code  early-binds a client. What is a programmimg model for accessing
> late-bound services ?

Well, just look at your favourite languages' HTTP libs.

> If a client wants to get a quote from a late-bound, SOAP-based service , it
> could ask for it like this :
> POST soapgateway;stockquote:sunw

How so?  Where's the documented expectation that POST will retrieve a
quote?

> and from another non-SOAP service like this :
> GET quotes/sunw,
> using the same code, perhaps normalizing response data into a common format.
> So a question is : can a code be generated for a client so that it could
> transparently talk to multiple services ?

Sorry, not following again... what would you want this code to do?
Handle the different data formats?  Sure, that could be done.

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

Received on Monday, 22 September 2003 22:35:35 UTC