- From: Savas Parastatidis <Savas.Parastatidis@newcastle.ac.uk>
- Date: Mon, 21 Jul 2003 18:09:38 +0100
- To: <www-ws-desc@w3.org>
Sanjiva, [snip] > > (Going further back in my original note) > > > Basically that means we drop the nested anonymous complexType > > inclusion capability. The syntax would then be: > > > > <operation name="ncname"> > > <input (element|body)="qname" [headers="list-of-qnames"]/> > > <output (element|body)="qname" [headers="list-of-qnames"]/> > > </operation> > > > > If @element is used then only that element will appear in the > > body. If @body is used then that's the type representing all > > of body content, i.e., the type of soap:Body in the case of SOAP. > > I like this approach, but I'm am a bit concerned that the subtlety > of @element vs. @body may not be clear to most. Note that I didn't > use @type for @body for a reason: doing so would give the casual > reader the feeling that we've retained the part/@type vs. part/@element > distinction and of course that's complete wrong! > > To reiterate: In the SOAP case, @element refers to a SINGLE > element inside <soap:Body>. That is what I believe the 80-20 > case for SOAP: the body only contains one and only one element. > In the non-SOAP case, one can bind the single element or > the multiple things inside the complex type any way they > wish. > Wouldn't it be better if you kept @body instead of @element and introduced the additional restriction of @body only referring to a complexType? That way you could capture both cases... One could define a complexType with only one element (most SOAP cases, as you suggested) or one could define a complexTypes with multiple elements (the first example in the SOAP 1.2 has two elements in the body). Keeping @element restricts what people can do, which is going to be more confusing to people who read the SOAP spec (why can't I have multiple elements in the SOAP body you say? Surely, not because I couldn't describe it at the interface level.) Of course, now, you always have to define global complexTypes that are used for @body but, IMHO, that's fine. [snip] Also, as I suggested in one of my responses to your original message, I believe that the use of @body should be optional. One may want to define a protocol where only headers are used. In your original syntax you had that but through the simplifications it got lost. <operation name="ncname"> <input [body="qname"] [headers="list-of-qnames"]/> <output [body="qname"] [headers="list-of-qnames"]/> </operation> Where the qname in @body MUST refer to a complexType. What do you think? (As always, it may be the case that I have completely misunderstood this :-) .savas.
Received on Monday, 21 July 2003 13:09:44 UTC