RE: Issue 169: Propose http method in the operation interface to simplify http binding.

Hi Sanjiva,

I'm obviously not the person to give a definitive or authoritative 
answer here given this is not my proposal, but i'll try and explain 
why i'm  supportive of putting @method (or some such) in the interface
So my views may or may not match those from DaveO, MarkN, Hugo, etc:

> I still haven't seen a defined semantic of what @webMethod="GET" 
> or @webMethod="POST" means in a generic sense. Can you please 
> provide those semantics? What are the accepted values for @webMethod?

My understanding is that the semantics are abstract and the values used
dependent upon the interface publisher. An interface may be designed to 
only use a constricted set of verbs, but those may not necessarily be 
"PUT, GET, POST, DELETE", but could be "buy, sell", "throw, catch", 
"push, pull", or whatever.

So the method becomes a mechanism for grouping operations. It doesn't 
make sense to me to duplicate that important communication inside and 
across multiple bindings.

Of course there are bindings where the abstraction meets reality, so
if my interface is built upon "GET, PUT, POST and DELETE" and my 
binding supports those verbs, then the binding author may elect to 
default the abstract verb to the application protocol verb.

> Unless such semantics can be given *in an HTTP independent manner*
> and they can potentially be bound to other protocols, I'm most 
> definitely -1 on adding @webMethod to interface/operation.

I'd be of the same opinion, but i'm convinced that there is a large
community of people building constricted interfaces as we type.
Allowing them to describe their interfaces using WSDL has great 
benefits for those of us wanting to use a single language to
describe all of our Web services.

> I would specifically appreciate your explaining the relationship
> between @webMethod and @safe (the latter of which we already have).

My understanding - i could elect to design an interface using an
interface method "FETCH" which i can annotate using @safe="true". 
Alternatively i could have an operation which is actually bound to 
HTTP "GET", but which has a side-effect. So i'd mark it with 
safe="false". Nothing new there.

> Also, in a SOAP world, how would @webMethod interact with
> wsoap:mep (and the implied HTTP method when SOAP/HTTP is in use)?

I'm not clear on this, but AIUI, that would depend upon the binding
of the method in the same way operation @name interacts with the MEP.

Hoe that helps and hasn't muddied the waters too much!

Paul

-- 
Paul Sumner Downey
Web Services Integration
BT Exact

Received on Monday, 12 July 2004 06:19:40 UTC