You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Kiran Bhumana <kB...@SeeBeyond.com> on 2003/01/21 01:43:23 UTC

Validation questions

 
1) Can I pass the schema locations programmatically and not have them at
all in the xml file ?
   As per what I gathered, I thought we could, but it does not recognize
the schema.
Only when I specify the schema location in the xml, will it try to parse
against the file
 
 
xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2002/07/business-proce
ss/ http://schemas.xmlsoap.org/ws/2002/07/business-process.xsd">
 
parser.setProperty("http://apache.org/xml/properties/schema/external-sch
emaLocation", "http://schemas.xmlsoap.org/ws/2002/07/business-process/
http://schemas.xmlsoap.org/ws/2002/07/business-process.xsd");
 
2) Why does it not recognize the following schema definition? I can view
it through explorer. (This same thing works fine with another xsd, per
say, wsdl.xsd)
 
[Warning]:6:139: schema_reference.4: Failed to read schema document
'http://schemas.x
mlsoap.org/ws/2002/07/business-process.xsd', because 1) could not find
the document;
2) the document could not be read; 3) the root element of the document
is not <xsd:sc
hema>.
 
Thanks,
Kiran.
 
-----Original Message-----
From: Kiran Bhumana 
Sent: Monday, January 20, 2003 3:49 PM
To: xerces-j-user@xml.apache.org
Subject: RE: another Validation question
 
So you are suggesting that I define my own xsd file and validate the
instance against it ?
 
-----Original Message-----
From: Jeff Greif [mailto:jgreif@alumni.princeton.edu] 
Sent: Sunday, January 19, 2003 11:42 PM
To: xerces-j-user@xml.apache.org
Subject: Re: another Validation question
 
Since you are validating the document against the wsdl schema, it must
conform to the WSDL schema.  The root element, <definitions> must have
element content of
<documentation>?,<import>* <types>? ,<message>*,<portType>*,<binding>*,
<service>* (and, in WSDL 1.2, <serviceType>*).  No other element content
is permitted.  At least one content element other than documentation
must be present.  The various elements allowed as content may contain
extension elements (outside the wsdl namespace) in certain parts of
their content.
 
<import> is used to access either datatypes or wsdl elements (those
listed above) held in other files.  In wsdl 1.2, no imported item may be
in the targetNamespace of the wsdl definitions while wsdl 1.1 is looser.
When <import> specifies a namespace, this means it is legal to refer to
components from that namespace in the importing document.  The schema
processor must also be able to find the declarations of those
references, and uses the schema locations for this purpose (or a
location attribute specified in <import>).
 
Jeff
 
 >>>>
I have defined "slt" in the wsdl file.
 
[Error]:20:40: cvc-complex-type.2.4.a: Invalid content starting with
element 'slt:ser
viceLinkType'. The content must match
'(((("http://schemas.xmlsoap.org/wsdl/":documen
tation){0-1}),((WC[##other:"http://schemas.xmlsoap.org/wsdl/"]){0-UNBOUN
DED})),((("ht
tp://