Thanks Brent. What I am trying to do is a simple unit test case:<br>1) Create an SP metadata file with signature.<br>2) Load the metadata and validate couple things including the signature.<br><br>Attached is the metadata file I created. When I try to validate it, I got the exception.<br clear="all">
<br>I have been using createSAMLObject in a lot of places, here is the code:<br><br>public static <T> T createSAMLObject( final Class<T> classVar )<br> {<br> XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory(); <br>
<br> QName defaultElementName;<br><br> T object = null;<br> try<br> {<br> defaultElementName = (QName)classVar.getDeclaredField( "DEFAULT_ELEMENT_NAME" ).get( null );<br><br>
object = (T)builderFactory.getBuilder(defaultElementName).buildObject( defaultElementName ); <br><br> }<br> catch ( Exception e )<br> {<br> // TODO Add log to show the error when trying to get DEFAULT_ELEMENT_NAME<br>
e.printStackTrace();<br> }<br><br> return object;<br> } <br><br><br clear="all">Yaowen<br>
<br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 3:47 PM, Brent Putman <span dir="ltr"><<a href="mailto:putmanb@georgetown.edu" target="_blank">putmanb@georgetown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 10/31/12 5:37 PM, Yaowen Tu wrote:<br>
><br>
</div><div class="im">> Signature signature = createSAMLObject( Signature.class );//a<br>
> wrapper to create a saml object easier.<br>
<br>
<br>
</div>This is suspicious. I don't know what you're doing there, but that<br>
might be related to your problem. You should use a builder to create<br>
the Signature object and I don't know how you're doing that based on a<br>
class literal. A QName would make sense, but not a Signature.class literal.<br>
<div class="HOEnZb"><div class="h5">--<br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net">dev-unsubscribe@shibboleth.net</a><br>
</div></div></blockquote></div><br>