Re: Few questions about REST

Hello Mark,

> Well, technically it does.  REST is pretty strict, because it requires
> that certain constraints be followed.  If you don't follow all of them,
> then you're not RESTful, though you may be "mostly RESTful", or "nearly
> RESTful".  But some constraints are more important than others in
> determining how "mostly" or "nearly" you are.

So, as far as doc-lit SOAP is concerned :
It can meet a resource identification constraint, either completely, by
using a URI which is fully visible (at least the latest SOAP specs recommend
it) or partially, by combining a Request URI and a control parameter like
(SOAP)'action' into a single URI (this combination will be done by a POST
handler and as such, a combined URI is not visible to intermediaries).
It does not strictly meet a uniform interface constraint when it retrieves
representations by using POST instead of GET.
However, when a Web Method feature is combined with a SOAP Response Pattern
(sorry, no links), that is, when an HTTP GET is issued and a doc-lit SOAP
body is returned (not WSDL), then these key constraints are met completely.
I'm not sure how tools support it at the moment.
It also probably meets other constraints, such as self-description and state
as representation, or at least can meet them.

Can we consider doc-lit SOAP as being "mostly RESTful" ?

I'd like to ask again about late-binding. You noted earlier that integration
costs rise significantly if a service is early-bound. Can you please explain
what you mean ?
I thought that the main issue, as far as integration is concerned, when RPC
method names and parameters, directly bound to some underlying objects, were
transmitted in a message body with any subsequent change in the
implementation requiring a new service interface.
Doc-lit SOAP services are early-bound, but I don't see yet how this fact can
increase integration costs. Also, it's not quite clear, how late-binding
would decrease them.
It seems a WSDL Requirement 085 allows for late-bound services to be
designed, which looks to me as if  late-binding is mainly about dynamic
allocation of resources.

Cheers
Sergey Beryozkin





----- Original Message -----
From: "Mark Baker" <distobj@acm.org>
To: "Sergey Beryozkin" <sberyozkin@zandar.com>
Cc: <www-archive@w3.org>
Sent: Saturday, September 13, 2003 12:50 AM
Subject: Re: Few questions about REST


> On Fri, Sep 12, 2003 at 05:43:58PM -0400, Sergey Beryozkin wrote:
> > > To me "doc-style SOAP" is "RESTful SOAP".
> > OK, it feels to me it is indeed, I just need to correlate what you
explained
> > to me with this statement.  Most probably I'm missing something, but to
me
> > it means that to be RESTful doesn't mean that all REST constraints
should be
> > (strictly) met.
>
> Well, technically it does.  REST is pretty strict, because it requires
> that certain constraints be followed.  If you don't follow all of them,
> then you're not RESTful, though you may be "mostly RESTful", or "nearly
> RESTful".  But some constraints are more important than others in
> determining how "mostly" or "nearly" you are.
>
> > I may be wrong but this is what I think at the moment :
> > First of all, it seems that doc-style SOAP does not (strictly meet) a
> > resource identification constraint, because even though pure docs are
> > exchanged (no method names), it's not possible to find a mapping to
> > representation from a resource identifier alone, which is normally found
> > today by combining a URI and a control parameter (I meant SOAPAction
header
> > or an action attribute of application/xml+soap mime type), which is not
a
> > part of URI.
>
> Yes, well said.
>
> > That's why I was asking whether such a combination would meet the
> > constraint, and you think it would not.
>
> Right.
>
> > But if something like http://example.org/soapGateway;stockquote:sunw is
> > semantically equivalent to
> > http://example.org/soapGateway
> > application/xml+soap; action : stockquote:sunw
> > (sorry, I'm not sure about the syntaxis )
> > then doc-style SOAP does meet this constraint
>
> If you're saying that if doc-style SOAP used the URI there, then yes.
> That's RESTful SOAP (at least for those subset of REST's constraints
> that we're discussing).
>
> > Because late-binding is derived from a combination of a uniform
interface
> > and resource identification constraints, doc-lit SOAP is early bound,
also,
> > a generic firewall might also have problems as all requests, while being
> > pure docs, are still sent to a single URI (if my argument that it does
not
> > meet a latter constraint is correct)
>
> Yes, that's true too.  Putting identifying information in a place where
> the firewall doesn't know to look, is reducing visibility in a similar
> way as moving the method around the message envelope does.
>
> > Second, a doc-lit SOAP does not always meet a uniform interface
constraint
> > (which assumes that every method has well-known semantics) when it uses
POST
> > for information retrieval operations. One can use a Web Feature method,
that
> > is to use GET for a retrieval, but this seems to be used only as a
> > bootstrapping operation invoked only once as a very first operation.
>
> You mean for the WSDL?  That's what I've seen the Web method feature
> used for more than anything else.  Though it's pretty early to say that
> a standard practice with it has emerged.
>
> > Subsequent retrievals will still be POSTed for (I'm not completely sure
I'm
> > correct here), which means generic intermidiaries can't cache the
response,
>
> Right.  Amoungst other things ...
>
> > because they don't expect anything more than HTTP 200 OK from such a
> > request.
>
> I wouldn't say that.  They can't cache it because it's not using GET
> (roughly).
>
> > I'd appreciate your comments on this.
> >
> > > telnet example.org 8080
> > > GET stockquote:sunw HTTP/1.1
> >
> > That's neat, I didn't know about this technique, thanks
>
> Sure.  That's the magic of the uniform semantics of HTTP; they apply to
> all resources, not just those using the http scheme.
>
> > Cheers
> > Sergey Beryozkin
> >
> > P.S. Sorry for reordering your comments from the last reply
>
> I didn't even notice! 8-)
>
> Mark.
> --
> Mark Baker.   Ottawa, Ontario, CANADA.        http://www.markbaker.ca
>
>

Received on Wednesday, 17 September 2003 06:10:51 UTC