W3C home > Mailing lists > Public > www-ws-desc@w3.org > March 2005

Re: Is schemaLocation Required When Importing Inline Schemas?

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Wed, 30 Mar 2005 16:18:38 -0500
To: Anish Karmarkar <Anish.Karmarkar@oracle.com>
Cc: www-ws-desc@w3.org, www-ws-desc-request@w3.org
Message-ID: <OF1CC7A9CE.D4587F6E-ON85256FD4.00729E09-85256FD4.00750DD4@ca.ibm.com>
Anish,

It seems to me that the way we have defined WSDL, the inlined schema take 
precedence over the "well-known" schemas. I say this because the inlined 
schemas are not made visible to WSDL components via an <xs:import>. It is 
the <xs:import> that introduces the problem because schemaLocation is only 
a hint. If there is no <xs:import> there is no schemaLocation and 
therefore no hint. The component model associated with the WSDL document 
contains the Element Declaration or Type Definition Components that are 
contained in the inline schema.

So in your example, we have the complexType bar that gets added to the 
Component Model by virtue of it being defined in an inline schema. When 
the second document refers to bar and uses the <xs:import>, then isn't it 
reasonable to say that there is no need to consult the "well-known" 
definition? i.e. any inline schema is better known than any other external 
schema. 

I think its fair to say that the WSDL document establishes a context for 
the resolution of <xs:import>'s. I think we need to describe this 
precisely since WSDL documents are meant to be interchanged and their 
interpretation needs to be consistent by all consumers, otherwise there 
will be no interoperability.

Arthur Ryman,
Rational Desktop Tools Development

phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca
intranet: http://labweb.torolab.ibm.com/DRY6/



Anish Karmarkar <Anish.Karmarkar@oracle.com> 
Sent by: www-ws-desc-request@w3.org
03/30/2005 01:17 PM

To
Arthur Ryman/Toronto/IBM@IBMCA
cc
paul.downey@bt.com, www-ws-desc@w3.org
Subject
Re: Is schemaLocation Required When Importing Inline Schemas?







I wasn't in the WG when the original discussion occurred, but I had a 
concern wrt the MUST in the statement (perhaps an edge case, 
nevertheless something that the WG should consider):
What happens if there is an inline definition/decl of a particular 
well-known QName reference to element/type in a WSDL that is 
imported/included and the definition/decl does not match the well-known 
one?

For example, wsdl1 imports wsdl2 and wsdl2 contains a definition of a 
complexType {http://example.com/type}bar that is well know and cached by 
the processor processing wsdl1. wsdl1 does not use/reference any 
constructs defined in wsdl2 that use {http://example.com/type}bar, but 
wsdl1 does directly reference {http://example.com/type}bar complexType 
(and does the relevant import of the namespace).
In the above case, the processor processing wsdl1 should be allowed to 
ignore the inline definition of the complexType 
{http://example.com/type}bar in wsdl2.

A minor amendment to the proposal that I would like to suggest is that 
the MUST be converted to a SHOULD with appropriate explanation OR keep 
the MUST and modify the wordings so that cases such as the one above are 
excluded.

-Anish
--

Arthur Ryman wrote:
> 
> Paul,
> 
> I think I'd like to rephrase this proposal to remove any reference to a 
> processor since we agreed to take processors out ot the spec. We can 
> phrase this in terms of document validity as follows:
> 
> "All inline schemas that are contained in a WSDL document and any other 
> WSDL documents that it directly or indirectly imports or includes MUST 
> be used when resolving QName references to elements or types that belong 

> to namespaces that  are imported via xs:import elements that have no 
> schemaLocation attribute."
> 
> Arthur Ryman,
> Rational Desktop Tools Development
> 
> phone: +1-905-413-3077, TL 969-3077
> assistant: +1-905-413-2411, TL 969-2411
> fax: +1-905-413-4920, TL 969-4920
> mobile: +1-416-939-5063, text: 4169395063@fido.ca
> intranet: http://labweb.torolab.ibm.com/DRY6/
> 
> 
> *<paul.downey@bt.com>*
> Sent by: www-ws-desc-request@w3.org
> 
> 03/30/2005 06:58 AM
> 
> 
> To
>                Arthur Ryman/Toronto/IBM@IBMCA, <www-ws-desc@w3.org>
> cc
> 
> Subject
>                RE: Is schemaLocation Required When Importing Inline 
Schemas?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Arthur wrote:
> 
>  > "If schemaLocation is not present then a WSDL processor
>  > MUST attempt to locate the schema among the inline schemas
>  > it has encountered while processing the WSDL document."
> 
> i do recall how deep the discussion went regarding the WSDL
> WG's ability to define how a schema processor should operate,
> even in this high level context, and there were one or two
> edge cases.
> 
> However, this is a common sense approach given it matches
> how most WSDL 1.1 implementations work, and therefore likely to
> simplify the migration of a description from WSDL 1.1 to WSDL 2.0,
> so +1.
> 
> Paul
> 
> 
> 
> 
Received on Wednesday, 30 March 2005 21:18:46 GMT

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