Question on using xs:import with wsdl:import

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 UTC