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

RE: Importing schemata into WSDL

From: Don Mullen <donmullen@tibco.com>
Date: Fri, 11 Oct 2002 15:31:30 -0400
Message-ID: <339902DC0E58D411986A00B0D03D843201B2460C@extmail.rtp.tibco.com>
To: "'Jacek Kopecky'" <jacek@systinet.com>, WS Description WG <www-ws-desc@w3.org>
Cc: Amy Lewis <alewis@tibco.com>


I agree with Jacek.  I don't think including a schema that has an import
effectively exposes the imported schema.

It strikes me that we have several options, three of which I will list here:

--------------
1) Add an attribute to <import> indicating the expected document type being
imported :

<import namespace="anyUri" importType="anyUri" [location="anyUri"] />

The importType uri would be the namespace of the type of document that is
being imported:
WSDL 1.2 = "http://www.w3.org/2002/07/wsdl"
XML Schema 1.0 = "http://www.w3.org/2001/XMLSchema"

importType could be optional and default to WSDL 1.2.

--------------
2) Add a separate <typesImport> :

<typesImport namespace="anyUri" importType="anyUri" [location="anyUri"] />

The importType uri would be the namespace for the schema language that is
being imported:
XML Schema 1.0 = "http://www.w3.org/2001/XMLSchema"
RELAX NG = "relaxNGUri"
etc.

--------------
3) Add an <import> as a child of <types> that only imports schemas:

<wsdl:types>
  <import namespace="anyUri" importType="anyUri" [location="anyUri" />
</wsdl:types>

--------------

I would argue that WSDL 1.1 made a mistake in adding embedded schemas using
<types> -- WSDL should get out of types definitions space and drop <types>
completing -- just allow <import> of schemas.

Don

-----Original Message-----
From: Jacek Kopecky [mailto:jacek@systinet.com]
Sent: Friday, October 11, 2002 1:16 PM
To: WS Description WG
Subject: Importing schemata into WSDL

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 15:33:24 GMT

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