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

Re: Question on using xs:import with wsdl:import

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Fri, 18 Nov 2005 09:53:49 -0500
To: Arthur Ryman <ryman@ca.ibm.com>
Cc: "John Kaputin (gmail)" <jakaputin@gmail.com>, John Kaputin <KAPUTIN@uk.ibm.com>, www-ws-desc@w3.org, www-ws-desc-request@w3.org
Message-ID: <OF7A908720.682D497D-ON852570BD.0050A269-852570BD.0051D3CB@ca.ibm.com>
John,

Below I stated:

"If a document contains a QName reference whose namespace is different 
that the document's, then the document MUST import that namespace."

That is almost correct.

In the case of a WSDL document that contains a QName reference to an XSD 
element or type, then the document MUST either import that namespace via 
<xs:import> or define the element or types inline via <xs: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



Arthur Ryman/Toronto/IBM@IBMCA 
Sent by: www-ws-desc-request@w3.org
11/17/2005 08:01 PM

To
"John Kaputin (gmail)" <jakaputin@gmail.com>
cc
John Kaputin <KAPUTIN@uk.ibm.com>, www-ws-desc@w3.org, 
www-ws-desc-request@w3.org
Subject
Re: Question on using xs:import with wsdl:import







John, 

The Primer is correct and there is no need for an <xs:import> in the 
use-credit-card-faults.wsdl document because that document does not 
contain any QName references to the elements. 

WSDL and XSD imports and includes are DOCUMENT constructs. They completely 
disappear from the Component Model. 

The rules governing imports are purely syntactical. If a document contains 
a QName reference whose namespace is different that the document's, then 
the document MUST import that namespace. 

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 


"John Kaputin (gmail)" <jakaputin@gmail.com> 
Sent by: www-ws-desc-request@w3.org 
11/17/2005 06:37 PM 


To
www-ws-desc@w3.org 
cc
John Kaputin <KAPUTIN@uk.ibm.com> 
Subject
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 Friday, 18 November 2005 14:54:17 GMT

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