You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ds...@mmm.com on 2002/05/21 22:21:45 UTC

Validating with External Schema...(SAX)

Websphere Version 4.0 Build 1030....I'm using the Xerces "plugin" that came
with WASD...

I'm trying to validate an xml document (a string in xml format that I load)
but I'm running into some errors saying that my parser doesn't support
certain properties....Here's the code...

SAXParser myparser = new SAXParser();
myparser.setFeature("http://xml.org/sax/features/validation",true);
myparser.setFeature("http://apache.org/xml/features/validation/schema",true
)
;
myparser.setProperty("
http://apache.org/xml/properties/schema/external-schem
aLocation", new String("mesapi/schemas/version2.0/mymethod
http://localhost:8080/MyWebService/sample/Inventory/mymethod.xsd"));
But I get a SaxNotRecognized Exception...
http://apache.org/xml/properties/schema/external-schemaLocation
java.lang.Exception: SaxnotrecognizedException

I'm a relative newbie with java but
I was using visual age and this code worked...so I'm assuming that there's
some other SAXParser() in my path and that's the one that is getting
created...how do I set the path in WASD?  In VA it was run->main->check
class path etc...  My xml documents that come in do NOT have the
xsi:location data within them and I do NOT want them to.

The format for my xml coming in is..
<request xmlns="myserver/myversion/MyMethod">
   <somevalue>x</somevalue>
    <secondvalue>y</secondvalue>
</request>

Thanks

Doug




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org