W3C home > Mailing lists > Public > www-ws-desc@w3.org > October 2002

Importing schemata into WSDL

From: Jacek Kopecky <jacek@systinet.com>
Date: 11 Oct 2002 19:15:35 +0200
To: WS Description WG <www-ws-desc@w3.org>
Message-Id: <1034356535.23818.17.camel@krava>

Hi all, 8-)

in WSDL 1.1 the import statement allowed importing schema documents. In
WSDL 1.2 we are apprarently moving in the direction of disallowing this,
but we acknowledge it must be possible to import an external schema into
a WSDL definitions document somehow.

What I've heard from Gudge is that it is possible to import a schema at
http://example.org/schema.xs (with the same target namespace) using

<wsdl:types>
  <xs:schema>
    <xs:import namespace="http://example.org/schema.xs"
               location="http://example.org/schema.xs"/>
  </xs:schema>
</wsdl:types>

I have a problem with this because IMHO this violates XML Schema import
semantics. Let me explain:

Let's assume I have three schemas, a.xs, b.xs and c.xs, with different
target namespaces; where a.xs only imports b.xs and b.xs imports c.xs.
On the component level; a.xs then contains all the type and element
definitions from a.xs and all the type and element definitions from b.xs
are accessible in a.xs. 

Note that no definitions from c.xs are visible in a.xs - this is logical
because the fact that b.xs imports c.xs is just an implementation detail
of b.xs and should not be propagated outside of b.xs. In other words,
a.xs must not be affected by a change to b.xs that only removes the
import and redefines those definitions (still in b.xs) that used
definitions from c.xs.

What I think this means is that an xs:schema element (together with any
contents) is a syntactic representation of the set of type and element
definitions contained within.

I think it's apparent from the paragraph above that WSDL should not know
about imports in wsdl:types/xs:schema. I.e. a schema cannot be imported
into a WSDL definitions document by importing it in a contained schema.

I think that we'll have to reallow our import statement to import
schemas (which should be doable in a safe way, I believe) or we should
introduce a typesImport statement that would serve to import external
schemata, as the types statement serves to provide (import) internal
schemata.

Hope it makes sense,

                   Jacek Kopecky

                   Senior Architect, Systinet Corporation
                   http://www.systinet.com/
Received on Friday, 11 October 2002 13:15:42 GMT

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