W3C home > Mailing lists > Public > www-ws-desc@w3.org > March 2006

Re: Must XML schema elements by imported in WSDL 2.0?

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Tue, 21 Mar 2006 16:55:50 -0500
To: Amelia A Lewis <alewis@tibco.com>
Cc: www-ws-desc@w3.org, www-ws-desc-request@w3.org
Message-ID: <OF10C09847.D9138EEC-ON85257138.0077509C-85257138.00787477@ca.ibm.com>
Amy,

XMLSchema.xsd defines other simple types and complex types in addition to 
elements. If a schema refers to any component in the XML schema namespace 
other than the built-in simple types, then the schema must explicity 
import the namespace.

The summary is:

If a WSDL 2.0 document refers to any component (element, simple type, 
complex type, etc) of the http://www.w3.org/2001/XMLSchema namespace 
except the built-in simple types, then it MUST import 
http://www.w3.org/2001/XMLSchema.

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca



Amelia A Lewis <alewis@tibco.com> 
Sent by: www-ws-desc-request@w3.org
03/20/2006 02:05 PM

To
Arthur Ryman/Toronto/IBM@IBMCA
cc
www-ws-desc@w3.org
Subject
Re: Must XML schema elements by imported in WSDL 2.0?







I took this to our schema guru, who is also on the schema WG.

He agreed with Arthur and Robert; we need to require an import for use
of schema global definitions (element and type, although I don't
believe we permit use of type?), but not for use of schema simple types.

Amy!
On Thu, 16 Mar 2006 12:58:30 -0500
Arthur Ryman <ryman@ca.ibm.com> wrote:

>Roberto, I agree with your proposal.
>
>I did an experiment with Xerces. Consider the following valid schema, 
>test1.xsd:
>
><?xml version="1.0" encoding="UTF-8"?>
><schema xmlns="http://www.w3.org/2001/XMLSchema"
>        targetNamespace="http://www.example.org/test1"
>        xmlns:tns="http://www.example.org/test1">
> 
>        <import namespace="http://www.w3.org/2001/XMLSchema"></import>
>
>        <complexType name="schemaType">
>                <sequence>
>                        <element ref="schema"></element>
>                </sequence>
>        </complexType>
></schema>
>
>If I remove the <import> Xerces gives me the following error:
>
>src-resolve.4.2: Error resolving component 'schema'. It was detected
>that 'schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but 
>components from this namespace are not referenceable from schema
>document 'file:///D:/workspaces/WSD/schematest/test1.xsd'. If this is
>the incorrect namespace, perhaps the prefix of 'schema' needs to be
>changed. If this is the correct namespace, then an appropriate
>'import' tag should be added to
>'file:///D:/workspaces/WSD/schematest/test1.xsd'.
>
>Therefore, to be consistent with XSD, we must require the <import>
>when refering to elements. In contrast, the following valid schema
>test2.xsd refers to a built-in simple type and there is no <import>
>
><?xml version="1.0" encoding="UTF-8"?>
><schema xmlns="http://www.w3.org/2001/XMLSchema"
>        targetNamespace="http://www.example.org/test2"
>        xmlns:tns="http://www.example.org/test2">
> 
>        <complexType name="countType">
>                <sequence>
>                        <element name="count" type="int"></element>
>                </sequence>
>        </complexType>
></schema>
>
>Arthur Ryman,
>IBM Software Group, Rational Division
>
>blog: http://ryman.eclipsedevelopersjournal.com/
>phone: +1-905-413-3077, TL 969-3077
>assistant: +1-905-413-2411, TL 969-2411
>fax: +1-905-413-4920, TL 969-4920
>mobile: +1-416-939-5063, text: 4169395063@fido.ca


-- 
Amelia A. Lewis
Senior Architect
TIBCO/Extensibility, Inc.
alewis@tibco.com
Received on Tuesday, 21 March 2006 21:56:04 GMT

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