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 13:15:42 UTC