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

Re: Whoops - Example is invalid upate attached

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Wed, 20 Jul 2005 14:29:02 -0400
To: "RDBMS" <RDBMS@aol.com>, www-ws-desc@w3.org
Cc: "Booth, David \(HP Software - Boston\)" <dbooth@hp.com>
Message-ID: <OFF24E2334.8BDA44B3-ON85257044.0064504E-85257044.0065863C@ca.ibm.com>
James,

You don't need a WSDL 2.0 editor. Use any XML editor. Just import the wsdl 
namespace. See the test suite for examples.

I can't think of any other way to explain the situation. You are 
misinterpretting the spec but I can't think of any other way to explain 
the situation without repeating myself. 

We will try to reword the spec to make the situation clearer. Thx for your 
feedback.

Arthur Ryman,
Rational Desktop Tools Development

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
intranet: http://labweb.torolab.ibm.com/DRY6/



"RDBMS" <RDBMS@aol.com> 
07/20/2005 01:23 PM
Please respond to
"RDBMS"


To
Arthur Ryman/Toronto/IBM@IBMCA
cc
"Booth, David \(HP Software - Boston\)" <dbooth@hp.com>
Subject
Re: Whoops - Example is invalid  upate attached






Hi Again,
 
I was aware of point #1 from your response.  I had provided an XML 
instance document to ensure you could test/validate that the schemas 
(schema hierarchy) were functional and valid.
 
Although, you could also imply a simple analogy where the XML instance 
document I provided is somewhat similar to what should be encapsulated 
within the <SOAP:body/> of the SOAP envelope if the corresponding WSDL 
applied SOAP for the encoding.
 
I have quoted here the text from the WSDL 2.0 primer that had inspired my 
concern and various comments:
 
"... Note that only components defined in the schema itself and components 
included by it via xs:include are available to WSDL. Specifically, 
components that the schema imports via xs:import are NOT available to 
WSDL."
 
What I am referring to is the last sentence.
 
Again, going back to my schema hierarchy...
 
I can consume a schema outside of WSDL (e.g. validate my instance doc) as 
a logical "assembly" of schemas. At the "top-level", I only declare 
imports for those immediate child schemas of the top-level. One top-level 
schema, nothing more - even though I could have numerous layers vertical 
and horizontal of schema xs:imports located below.
 
Given the WSDL 2.0 text quoted above, I am interpreting this as no longer 
true when schema is declared with WSDL as xs:import to <types/>. 
 
To reference and consume the exact same "assembled" schema hierarchy from 
within a WSDL (e.g. generate a SOAP request instance, where the body will 
represent the message context as defined by my schema and its associated 
reference to interface and input/output parts), I would now have to 
declare 3 separate xs:imports within <types/> - even though the second and 
third of the 3 is already declared intrinsically by my schema hierarchy.
 
Again, application and use of my schema "assembly" outside of WSDL does 
not require this.  I only deal with the highest "top-Level" schema and its 
intrinsic and direct imports. My schema validator will resolve all of the 
lower level imports for me. I can rely upon my schema hierarchy and not 
manually recreate all of the lower level xs:imports for all schemas 
referenced and imported at all the levels below my top-level schema in 
order to process and validate.  The schema validator does that for me.
 
With WSDL, I was "hoping" to have the same capability.  Yet, that is not 
my interpretation of the statement from the WSDL draft. From that 
statement, I am interpreting that my lower-level, intrinsically declared 
xs:imports that may reference and reside in numerous schemas (modular 
sub-schemas) will have to be replicated within the WSDL <types/> rather 
than having the WSDL processor and schema validator resolve them naturally 
as a schema validator does today based upon the XML Schema recommendation.
 
I don't have a WSDL 2.0 compliant editor installed in my environment, so I 
cannot provide a working example as you have requested. I work with WSDL 
.0 and 1.1, but that would be out of context for this discussion as I do 
not believe the syntax of <interface/> is supported by those earlier 
recommendations.
 
I thank you for allowing me to monopolize your time (it really is much 
appreciated), but I assume that what I have interpreted and described will 
not be addressed in the WSDL 2.0 draft.
 
Thank you again !
J. Bean
P.O. Box 30171
Phoenix, AZ  85046-0171
 
RDBMS@aol.com
XML-Guy@hotmail.com
----- Original Message ----- 
From: Arthur Ryman 
To: RDBMS ; www-ws-desc@w3.org 
Cc: Booth, David (HP Software - Boston) 
Sent: Wednesday, July 20, 2005 7:26 AM
Subject: Re: Whoops - Example is invalid upate attached


James, 

Your schema now validates, but you are still using an XML instance 
document as your example, not a WSDL document. As I mentioned in my 
original response, I think the confusion really is what you understand by 
WSDL reference schema elements. Let me summarize: 

1. If an XML instance document contains an element, e.g. 
<name:SIN>123456789</name:SIN>,  then it does NOT have to contain an 
<xs:import> for the namespace. All you need is a namespace declaration and 
possibly a schemaLocation. 

2. If an XSD or WSDL document references an element via QName, e.g. 
<wsdl:input element="name:SIN"/>, then it must contain an <xs:import> for 
the namespace. 

If this is still not clear, please create a valid WSDL example that 
illustrates your problem. If you'd like to see some examples of valid WSDL 
documents, look at the primer [1] or the test suite [2]. 

[1] 
http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/wsdl20/wsdl20-primer.html 

[2] http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/documents/good/ 

Arthur Ryman,
Rational Desktop Tools Development

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
intranet: http://labweb.torolab.ibm.com/DRY6/ 


"RDBMS" <RDBMS@aol.com> 
07/20/2005 08:14 AM 

Please respond to
"RDBMS"



To
Arthur Ryman/Toronto/IBM@IBMCA 
cc
"Booth, David \(HP Software - Boston\)" <dbooth@hp.com> 
Subject
Re: Whoops - Example is invalid  upate attached








Hi Arthur, David, 
  
Here is another example that might be better. It validates with msxml4 and 
with XML Spy. 
  
In this case, the hierarchy is A -> B -> C 
  
The instance document will represent structure and containers that are 
declared from all 3 schemas. 
  
Yet, SchemaA (top-level) only imports SchemaB.  It does not import 
SchemaC. 
  
SchemaB imports SchemaC. 
  
Sorry about the validation error (again). Proves that haste can cause 
problems ;-) 
  
Although very simple and a single branch, this example is more 
representative of the schema reuse and assembly scenario I run into quite 
a lot. You could extend this simple model horizontally and vertically with 
additional imports. 
  
Also, and if I am still interpreting the WSDL draft correctly, it requires 
that I have to declare imports for all 3 schemas in <types/>, rather than 
just SchemaA. 
  
Thanks again, 
J. Bean
P.O. Box 30171
Phoenix, AZ  85046-0171 
  
RDBMS@aol.com
XML-Guy@hotmail.com 
----- Original Message ----- 
From: Arthur Ryman 
To: RDBMS 
Cc: Booth, David (HP Software - Boston) ; www-ws-desc@w3.org 
Sent: Tuesday, July 19, 2005 9:32 PM 
Subject: Re: Whoops - Example is invalid upate attached 


James, 

Ignore, my comments below. After looking closer, I now see you wanted me 
to look at SchemaA.xsd, not the instance document.  It says: 

       <!--  Note that the import below ONLY imports schema "B". Schema 
"C" is imported by declaration from wityhin schema "B", so you will not 
see it here  --> 

The following reference is invalid: 

                               <xs:element ref="C:ElementFromC" minOccurs=
"1"/>                 

You claimed it was valid, but I validated it myself and got the following 
error message: 

Severity        Description        Resource        In Folder Location  
Creation Time 
2        src-resolve.4.2: Error resolving component 'C:ElementFromC'. It 
was detected that 'C:ElementFromC' is in namespace 'http://www.testC.com', 
but components from this namespace are not referenceable from schema 
document 
'file:///D:/workspaces/James/Example/data/RLG/MISC/WSDL%202.0%20Problem%20Examples/SchemaA.xsd'. 
If this is the incorrect namespace, perhaps the prefix of 'C:ElementFromC' 
needs to be changed. If this is the correct namespace, then an appropriate 
'import' tag should be added to 
'file:///D:/workspaces/James/Example/data/RLG/MISC/WSDL%202.0%20Problem%20Examples/SchemaA.xsd'. 
       SchemaA.xsd        Example/data/RLG/MISC/WSDL 2.0 Problem Examples  
     line 18        July 20, 2005 12:23:32 AM 

The error message says you need to import namespace C. 

I am using the Xerces parser for validation (actually integrated in the 
Eclipse Web Tools Platform which you can download from [1]. How are you 
validating your schema? 

[1] http://eclipse.org/webtools 


Arthur Ryman,
Rational Desktop Tools Development

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
intranet: http://labweb.torolab.ibm.com/DRY6/ 

Arthur Ryman/Toronto/IBM 
07/20/2005 12:00 AM 


To
"RDBMS" <RDBMS@aol.com>, WSD WG 
cc
"Booth, David \(HP Software - Boston\)" <dbooth@hp.com> 
Subject
Re: Whoops - Example is invalid  upate attachedLink









James, 

I now undertand the confusion. In your example, you give an XML instance 
document, ExampleSchemaHierarchy.xml, that contains elements declared in 
the other schemas. In that case there is no need for an xs:import. 

That is not what we are talking about in the WSDL 2.0 spec. There we are 
taking about refering to element declarations via QNames. 

When a WSDL document refers to an element declaration by QName, for 
example to declare the messages in an operation, then it must have an 
xs:import for the namespace of the element it is refering to. This is just 
like in XSD when you build up a new element declaration from other element 
declarations. 

Arthur Ryman,
Rational Desktop Tools Development

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
intranet: http://labweb.torolab.ibm.com/DRY6/ 

"RDBMS" <RDBMS@aol.com> 
07/19/2005 03:57 PM 

Please respond to
"RDBMS"



To
Arthur Ryman/Toronto/IBM@IBMCA, "Booth, David \(HP Software - Boston\)" 
<dbooth@hp.com> 
cc

Subject
Whoops - Example is invalid  upate attached










Hi David, Arthur, 
 
In my haste, I found that I had incorporated and invalid type declaration. 

 
In the attached, I've corrected it. 
 
Thanks ! 
J. Bean
P.O. Box 30171
Phoenix, AZ  85046-0171 
 
RDBMS@aol.com
XML-Guy@hotmail.com 
Received on Wednesday, 20 July 2005 18:29:17 GMT

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