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

RE: Comments on Web Services Description Language (WSDL) Version 2.0 Part 0: Primer

From: <paul.downey@bt.com>
Date: Tue, 20 Sep 2005 14:55:34 +0100
Message-ID: <2B7789AAED12954AAD214AEAC13ACCEF1A033543@i2km02-ukbr.domain1.systemhost.net>
To: <dms@sosnoski.com>, <www-ws-desc@w3.org>

Here is a summary of the options, as I understand them, for 
using XML Schema to introduce a pair of in/out elements into 
a WSDL document:

1) inline the schema, no problems!

  <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
     targetNamespace="http://example.com/bar" >
     <element name="in" type="xs:string"/>
     <element name="out" type="xs:string"/>

2) import the external schema into a schema with the same
   targetNamespace - doesn't work since the targetNamespace is 
   already known to the processor

   <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
     targetNamespace="http://example.com/bar" >
     <xs:import namespace="http://example.com/bar" schemaLocation="bar.xsd"/>

3) import the external schema into a wrapper namespace
   - This doesn't work because the imported bar symbols 
     aren't visible outside the wrapper namespace:
  <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
     targetNamespace="http://example.com/wrapper" >
     <xs:import namespace="http://example.com/bar" schemaLocation="bar.xsd"/>

4) include the external schema into the bar namespace
 - works OK, though a little contrived IMO

  <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://example.com/bar" >
      <xs:include namespace="http://example.com/bar" schemaLocation="bar.xsd"/>
5) use the WSDL 2.0 ability to <xs:import directly under <types>

So, AIUI, you are contending that option 3 should in fact work. I think
the consensus of the WG is that xs:import isn't transitive, the most 
succinct explanation I have to hand is here:

If there has been a misunderstanding of the schema specification, then
it is embodied in current toolkits. You can confirm for yourself with the
attached example WSDL 1.1 documents.

As to a wrapper schema being 'cleaner', well, AIUI you will be able to 
publish WSDL 2.0 documents using option 4, but I personally like the direct 
<xs:import under <types>, even though it is specifically excluded by 
the WS-I Basic Profile.


> -----Original Message-----
> From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org]On
> Behalf Of Dennis Sosnoski
> Sent: 20 September 2005 07:08
> To: www-ws-desc@w3.org
> Subject: Comments on Web Services Description Language (WSDL) Version
> 2.0 Part 0: Primer
> I'm puzzled at the use of a special mechanism for importing 
> XML schemas, 
> as discussed in 2.3.2. AFAIKS, the same effect can be had by 
> just using 
> a simple xs:schema wrapper element:
>   <xs:schema>
>     <xs:import .../>
>   </xs:schema>
> This is a cleaner approach than just in-lining the xs:import and 
> xs:include, since it minimizes the number of different ways 
> of doing the 
> same thing. From the comment at the end of 2.3.1, it seems 
> that there's 
> a misunderstanding of how schema operates here. As I understand it, 
> imported schema definitions become part of the schema and 
> have the same 
> visibility as definitions made directly under the including 
> schema. In 
> support of this interpretation, section 4.2.3 of Schema Part 1 
> (http://www.w3.org/TR/xmlschema-1/#composition-schemaImport) 
> ends with:
> The ·schema components· 
> <http://www.w3.org/TR/xmlschema-1/#key-component> (that is {type 
> definitions} <http://www.w3.org/TR/xmlschema-1/#type_definitions>, 
> {attribute declarations} 
> <http://www.w3.org/TR/xmlschema-1/#attribute_declarations>, {element 
> declarations} 
> <http://www.w3.org/TR/xmlschema-1/#element_declarations>, 
> {attribute group definitions} 
> <http://www.w3.org/TR/xmlschema-1/#attribute_group_definitions
> >, {model 
> group definitions} 
> <http://www.w3.org/TR/xmlschema-1/#model_group_definitions>, 
> {notation 
> declarations} 
of a schema corresponding to a <schema> 
<http://www.w3.org/TR/xmlschema-1/#element-schema> element information 
item with one or more <import> 
<http://www.w3.org/TR/xmlschema-1/#element-import> element information 
items must include not only definitions or declarations corresponding to 
the appropriate members of its [children] 
<http://www.w3.org/TR/xml-infoset/#infoitem.element>, but also, for each 
of those <import> <http://www.w3.org/TR/xmlschema-1/#element-import> 
element information items for which clause 2 
<http://www.w3.org/TR/xmlschema-1/#c-ims> above is satisfied, a set of 
·schema components· <http://www.w3.org/TR/xmlschema-1/#key-component> 
identical to all the ·schema components· 
<http://www.w3.org/TR/xmlschema-1/#key-component> of *I*.

Given this, I don't see any possible reason why xs:imported components 
of a schema would not be available for reference by QName in the WSDL.

  - Dennis

Received on Tuesday, 20 September 2005 13:55:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:54:56 UTC