RE: Importing schemata into WSDL

Jacek,

I'm afraid I disagree with your analysis of how schema import works.
Here's why.

Taking your example:

Given three schema documents a.xsd, b.xsd and c.xsd with three separate
target namespaces, where a.xsd imports b.xsd imports c.xsd it is my
understanding that the following statements are true:

1.  The resulting schema contains components from all three namespaces

2.  Components in namespace a can only reference components in namespace
a and/or namespace b

3.  Components in namespace b can only reference components in namespace
b and/or namespace c

4.  Components in namespace c can only reference other components in
namespace c.

Note that the reason components in namespace a cannot reference
components in namespace c ( point 2 ) is because a.xsd does not have an
import for namespace c and the schema spec is very clear that you cannot
reference things in a namespace you have not imported ( same applies to
points 3 and 4 ).

However, the critical point from the POV of the component model for WSDL
is point 1. All we need to say is that for any <xs:schema> element in
<wsdl:types> ALL the schema components directly defined in the
<xs:schema> and those directly imported are visible to the rest of the
WSDL components and can be referenced. Strictly speaking we could also
say that you can reference components in other namespaces the are
imported at a deeper level, because those components ARE present, but
there would be no way of knowing about them in the WSDL itself without a
priori knowledge of the schemas you were directly importing.

Gudge

> -----Original Message-----
> From: Jacek Kopecky [mailto:jacek@systinet.com] 
> Sent: 11 October 2002 18:16
> 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 20:44:05 UTC