- From: Arthur Ryman <ryman@ca.ibm.com>
- Date: Wed, 20 Jul 2005 10:26:36 -0400
- To: "RDBMS" <RDBMS@aol.com>, www-ws-desc@w3.org
- Cc: "Booth, David \(HP Software - Boston\)" <dbooth@hp.com>
- Message-ID: <OF233931B0.B4D0763B-ON85257044.004D1337-85257044.004F5587@ca.ibm.com>
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
Attachments
- application/zip attachment: Schema_Hierarchy_to_WSDL.ZIP
Received on Wednesday, 20 July 2005 14:26:42 UTC