Is there a bug in schema validation when I use the external-schemaLocation ?

 

For example :

 

parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "http://schemas.xmlsoap.org/wsdl wsdl.xsd");

 

always returns something like <root_element> not found .

 

any help is appreciated.

 

Thanks,

Kiran

 

 

--- Begin Message ---

 

Sorry this question might have been asked before.

 

I want to validate a wsdl file. And this is the file I have.

 

<definitions targetNamespace="urn:echo:echoService"

             xmlns:tns="urn:echo:echoService"

             xmlns:slt="http://schemas.xmlsoap.org/ws/2002/07/service-link/"

             xmlns:xsd="http://www.w3.org/2001/XMLSchema"

             xmlns="http://schemas.xmlsoap.org/wsdl/">

 

   <message name="StringMessageType">

      <part name="echoString" type="xsd:string"/>

   </message>

…..

 

</definitions>

 

I am using a SAX parser and have set the following,

 

                parser.setFeature("http://xml.org/sax/features/validation"

                                          , true);

                parser.setFeature( "http://xml.org/sax/features/namespaces",true);

                parser.setFeature( "http://apache.org/xml/features/validation/schema",true);

                parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);

 

                parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "http://schemas.xmlsoap.org/wsdl wsdl.xsd");

 

and it says

cvc-elt.1: Cannot find the declaration of element 'definitions'.

 

What is it that could be wrong ?

 

Thanks,

Kiran

--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to