<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi All, <div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Il giorno 28 apr 2017, alle ore 21:24, Brent Putman <<a href="mailto:putmanb@georgetown.edu" class="">putmanb@georgetown.edu</a>> ha scritto:</div><div class=""><div text="#000000" bgcolor="#FFFFFF" class=""><br class="">
In v3, if you want to validate the XML at parsing time against the
SAML schemas, we have a convenience class
org.opensaml.saml.common.xml.SAMLSchemaBuilder for building a
javax.xml.validation.Schema instance. Then you configure that on
your ParserPool instance (e.g.
net.shibboleth.utilities.java.support.xml.BasicParserPool). This is
the easiest way to do JAXP-level schema validation.<br class=""></div></div></blockquote><br class=""></div><div>What about the Core Spec Validator? Is it still available? In v2 I had this nice method (that saved me a lot of time). </div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <span style="color: #931a68" class="">public</span> <span style="color: #931a68" class="">static</span> <span style="color: #931a68" class="">void</span> validateCoreSpec(<span style="color: #931a68" class="">final</span> SAMLObject <span style="color: #7e504f" class="">a</span>) <span style="color: #931a68" class="">throws</span> ValidationException {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <span style="text-decoration: underline" class="">ValidatorSuite</span> <span style="color: #7e504f" class="">val</span> = <span style="text-decoration: underline" class="">org.opensaml.Configuration</span>.getValidatorSuite(<span style="color: #3933ff" class="">"saml2-core-spec-validator"</span>);</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <span style="color: #931a68" class="">if</span> (<span style="color: #7e504f" class="">val</span> == <span style="color: #931a68" class="">null</span>) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <span style="color: #931a68" class="">throw</span> <span style="text-decoration: underline ; color: #931a68" class="">new</span><span style="text-decoration: underline" class=""> ValidationException(</span><span style="text-decoration: underline ; color: #3933ff" class="">"Unable to find a validator"</span><span style="text-decoration: underline" class="">)</span>;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> <span style="color: #7e504f" class="">val</span>.validate(<span style="color: #7e504f" class="">a</span>);</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;" class=""> }</div></div><br class=""><div class="">
--<br class="">Anger is a gift, <a href="http://www.mascanc.net/" class="">http://www.mascanc.net/</a>
</div>
<br class=""></div></body></html>