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

Question on using xs:import with wsdl:import

From: John Kaputin (gmail) <jakaputin@gmail.com>
Date: Thu, 17 Nov 2005 23:37:31 +0000
Message-ID: <4c2ae8f80511171537i2be39dbcl895e83334b601d0d@mail.gmail.com>
To: www-ws-desc@w3.org
Cc: John Kaputin <KAPUTIN@uk.ibm.com>
I have a question on the circumstances in which a schema namespace from an
imported WSDL needs to be xs:imported by the importing WSDL.

I have read Primer 3.2 'Importing Schemas' and I do understand why
updateDetails.wsdl does an xs:import of the namespace of the schema inlined
within the imported WSDL, retrieveDetails.wsdl - i.e. because the <input>
and <output> elements in updateDetails.wsdl refer directly to the
'reservationDetails' element declaration from that schema.

My question is based on the example in Primer 3.1 'Importing WSDL'.

credit-card-faults.wsdl has an xs:import of a schema document and defines
some interface <fault> elements that reference element declarations from
that schema.

use-credit-card-faults.wsdl imports credit-card-faults.wsdl and defines some
<outfault> elements that reference the <fault> elements defined in the
imported WSDL.

use-credit-card-faults.wsdl does NOT xs:import the schema namespace from
credit-card-faults.wsdl. I assume this is because there are no WSDL elements
in use-credit-card-faults.wsdl that directly reference the components of
that schema.

However, the Description component that these two WSDL documents map to will
contain InterfaceFault components representing the <fault> elements from
credit-card-faults.wsdl and InterfaceFaultReference components representing
the <outfault> elements from use-credit-card-faults.wsdl. The Description
component will also contain ElementDeclaration components (referenced by the
InterfaceFaults) which in turn represent the schema element declarations
from credit-card-faults.wsdl.

Here's my question:
if the Description component must contain ElementDeclaration components that
map to schema elements in the imported WSDL, should the importing WSDL
xs:import that schema's namespace, even though the WSDL elements of the
importing WSDL don't refer directly to that schema's elements?

Thanks,
John Kaputin.
Received on Thursday, 17 November 2005 23:37:36 GMT

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