OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Validating against schema a file with another schema in it.

[ Lists Home | Date Index | Thread Index ]

Could You help me please!
I have a problem I can't solve for a 2 monthes. I investigated archive, but no help found.
The problem is:
I want to validate XML file (namely WSDL file) with Xerces 1.4.3. WSDL file contains part of schema  in it.
And I could not validate it.
I set up all the feautres of parser to enable validation against schema. (I tried different combinations).
I downloaded all files concerning XML schema: datatypes.dtd, xml.xsd, XMLSchema.dtd, XMLSchema.xsd
I changed accordingly every xsi:schemaLocation.
When there is no elements from namespace "http://www.w3.org/2001/XMLSchema", and no location for this namespace is specified, document is valid.
But if I add ones - I have from Xerces J 1.4.3 (if some schemaLocation (local file) for namespace "http://www.w3.org/2001/XMLSchema" is specified )
"[Error] sample.wsdl:10:51: Schema error: The namespce name for 'schema' must be http://www.w3.org/2001/XMLSchema.
And I have (if no schemaLocation for namespace "http://www.w3.org/2001/XMLSchema" is specified )
"[Error] sample.wsdl:14:59: General Schema Error: Grammar with uri: http://www.w3.org/2001/XMLSchema , can not be found; schema namespace may be wrong:  Xerces supports schemas from the "http://www.w3.org/2001/XMLSchema" namespace or the instance document's namespace may not match the targetNamespace of the schema.
I'm definitly using XMLSchema.xsd for "http://www.w3.org/2001/XMLSchema".
Here is sample.wsdl
<?xml version="1.0"?>
<definitions name="StockQuote"
          xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ wsdl.xsd
 http://www.w3.org/2001/XMLSchema XMLSchema.xsd ">
       <xs:schema targetNamespace="http://example.com/stockquote.xsd"
           <xs:element name="TradePriceRequest">
                      <xs:element name="tickerSymbol" type="string"/>
           <xs:element name="TradePrice">
                      <xs:element name="price" type="float"/>
    <message name="GetLastTradePriceInput">
        <part name="body" element="xsd1:TradePriceRequest"/>
    <message name="GetLastTradePriceOutput">
        <part name="body" element="xsd1:TradePrice"/>
    <portType name="StockQuotePortType">
        <operation name="GetLastTradePrice">
           <input message="tns:GetLastTradePriceInput"/>
           <output message="tns:GetLastTradePriceOutput"/>
Am I wrong? Or is Xerces wrong?
May be someone know success story how to validate WSDL with another parser, or another version of Xerces, then tell me please it also.
Thanks a lot.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS