W3C home > Mailing lists > Public > www-ws-desc@w3.org > September 2006

RE: XML Schema requires a type in addition to name to identify an element

From: Rogers, Tony <Tony.Rogers@ca.com>
Date: Fri, 1 Sep 2006 15:00:47 +1000
Message-ID: <BEE2BD647C052D4FA59B42F5E2D946B33375E7@AUSYMS12.ca.com>
To: "Amelia A Lewis" <alewis@tibco.com>, "Jonathan Marsh" <jmarsh@microsoft.com>
Cc: <matthew@stickledown.com>, <www-ws-desc@w3.org>


I agree with Amy, although not in her words :-)

I don't see why we should or must specify xsi:type in the message schema
- if someone has chosen to use an abstract type (Vehicle, in your
example, is an abstract type) in their message schema, then there is
probably a good reason that they have done so - perhaps they truly mean
to accept ANY type that is based on Vehicle. In such a case, it is up to
the receiver of the message to determine which type of Vehicle they have
received, and act appropriately. WSDL, in its current form, will be
acting correctly.


Furthermore, if you really want the ability to put a constraint on
things, shouldn't you permit a LIST of xsi:type values, so that someone
may specify both Bicycle and Car if they wish to deal with wheeled
Vehicles?


Tony Rogers
tony.rogers@ca.com

-----Original Message-----
From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On
Behalf Of Amelia A Lewis
Sent: Friday, 1 September 2006 5:10
To: Jonathan Marsh
Cc: matthew@stickledown.com; www-ws-desc@w3.org
Subject: Re: XML Schema requires a type in addition to name to identify
an element


I have something of an objection to this issue.

WSDL can't constrain xsi:type.  *shrug*  Neither can W3C XML Schema.
It's sort of the point of xsi:type.  You get to have fun messing things
up, by specifying High Weirdness where whitebread schematypes are
expected.  Great way to break applications, btw.

I hope that at least the issue is expressed as "WSDL does not constrain
the contents of the xsi:type attribute," because I think that this is
more accurate than the submitted subject line (with respect to the
submitter; the fact that the industry has to stand on its head and hold
its jaw in odd positions in order to make W3C XML Schema meet
requirements is *not* in fact something that should necessarily force
WSDL to specify how to override or constrain those contortions).

Amy!
On Thu, 31 Aug 2006 11:28:44 -0700
"Jonathan Marsh" <jmarsh@microsoft.com> wrote:

>FYI, I've added this to the issues list as CR078 
>[http://www.w3.org/2002/ws/desc/5/cr-issues/issues.html#CR078].
>
> 
>
>________________________________
>
>From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On

>Behalf Of Matthew Rawlings
>Sent: Thursday, August 31, 2006 11:04 AM
>To: www-ws-desc@w3.org
>Subject: RE: XML Schema requires a type in addition to name to identify

>an element
>
> 
>
>I confirm that you now understand this correctly.  
>
> 
>
>I agree with you that the existing industry standard XML Schema 
>schemata are poorly adapted to being used in a WSDL service. This is to

>be expected as XML Schema predated WSDL.
>
> 
>
>I disagree that "one was stuck using a flexible schema (for political 
>reasons)". My personal opinion is the reason is that current industry 
>standard XML Schema schemata have long histories and large installed 
>bases of standards-compliant schema. The choice is whether to adapt 
>WSDL to XML Schema or adapt existing XML Schema schemata to WSDL. Both 
>are possible, one is more costly than the other.
>
> 
>
>My personal opinion is it would be far better if people could be 
>convinced for good engineering reasons. My personal opinion is that on 
>an engineering basis the type of the element is more important than its

>name when dealing with a type system such as XML Schema provides.
>
> 
>
>My personal opinion is a clear statement (positive or negative), from 
>the W3C WSDL Working Group on the merits of using xsi:type in the root 
>element would help industry standards groups prepare to adopt WSDL 2.0.
>Please make a statement to guide designers of XML Schema schemata in 
>their adoption of WSDL.
>
> 
>
>Matthew Rawlings
>
>________________________________
>
>From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On

>Behalf Of Jonathan Marsh
>Sent: 31 August 2006 17:17
>To: matthew.d.rawlings@jpmchase.com; www-ws-desc@w3.org
>Cc: stabet@ruleml.org; Steve Ross-Talbot; ylafon@w3.org
>Subject: RE: XML Schema requires a type in addition to name to identify

>an element
>
> 
>
>Thanks for the complete example, I understand the scenario as far as 
>the schema goes, but I'm not sure what you want added to WSDL to 
>support this use case.
>
> 
>
>One way to interpret your proposal is that wsdl:input/@type constrains 
>the allowed values of the xsi:type attribute appearing in the message 
>instance.  In other words, the message must match both the element name

>defined by wsdl:input/@element, and have an xsi:type attribute with the

>value given by wsdl:input/@type (and structure corresponding to it).
>
> 
>
>The schema you provide allows the transport element to take on a 
>variety of structures within the same element name.  In my experience 
>this is so the client (or generator) of the data has flexibility.  The 
>receiver is informed of the client's structural choice using xsi:type.
>
> 
>
>In WSDL, the schema defines the schema types deemed acceptable by the 
>service.  If a WSDL specified a flexible schema such as the one below, 
>one would expect it to be delegating the choice of structure to the 
>client.
>
> 
>
>Yet in your scenario, this delegated flexibility then is constrained.
>The WSDL defines a flexible schema, and then takes this flexibility 
>away by only allowing a specific xsi:type value.  One would presumably 
>only need this capability because one was stuck using a flexible schema

>(for political reasons) that was poorly adapted to a WSDL-described 
>service, which isn't a very compelling scenario.  If you really need 
>and expect flexible structures, I would generally expect the WSDL to 
>simply declare element=#any.
>
> 
>
>Please feel free to correct any misconceptions above, especially if 
>I've misinterpreted your proposal in some way.  I'm just trying to 
>understand better so we can resolve this quickly!
>
>


--
Amelia A. Lewis
Senior Architect
TIBCO/Extensibility, Inc.
alewis@tibco.com
Received on Friday, 1 September 2006 05:01:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:41 GMT