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: Thu, 16 Mar 2006 12:58:30 -0500
To: www-ws-desc@w3.org
Message-ID: <OF7B0057FD.65776D84-ON85257133.00626CFD-85257133.0062BD8E@ca.ibm.com>
Roberto, I agree with your proposal.

I did an experiment with Xerces. Consider the following valid schema, 

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        <import namespace="http://www.w3.org/2001/XMLSchema"></import>

        <complexType name="schemaType">
                        <element ref="schema"></element>

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 

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"
        <complexType name="countType">
                        <element name="count" type="int"></element>

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
Received on Thursday, 16 March 2006 17:58:53 UTC

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