AW: SAML metadata validation try two
Ortner Nikolaus
N.Ortner at fh-kaernten.at
Sat Jun 8 06:22:52 EDT 2013
> * Brian Tingle <Brian.Tingle at ucop.edu> [2013-06-07 05:15]:
> > How do I validate an instance of SAML metadata? I tried XML lint, and
> > I'm getting hella errors, but they seem like errors with the schema,
> > not my instance:
I validate XML-Files with a simple Java program:
[...]
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setFeature("http://apache.org/xml/features/validation/schema", true);
parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
parser.setErrorHandler(this);
parser.parse(new InputSource(input)); //java.io.Reader input: the document to validate
[...]
this = my class extending org.xml.sax.helpers.DefaultHandler, overwriting the methods fatalError(), error() and warning() to see the messages (i.e. printing out the stack trace).
Don't get a w3.org-timeout, but validation is slow.
Kind regards.
More information about the users
mailing list