Skip to Content.
Sympa Menu

mace-opensaml-users - RE: understanding the fromDOM method

Subject: OpenSAML user discussion

List archive

RE: understanding the fromDOM method


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: "'Tom Scavo'" <>, "'OpenSAML'" <>
  • Subject: RE: understanding the fromDOM method
  • Date: Tue, 24 Oct 2006 23:27:58 -0400
  • Organization: The Ohio State University

> - Why doesn't AttributeStatement.fromDOM call checkValidity?

Bug, meaningless in most cases since the old code always validates anyway.
The overall point of checkValidity is so there's a way to ensure that
toDOM() has what it needs, it's not really very important on this end.

> - Why does AuthenticationStatement.fromDOM check
>
> if (!XML.isElementNamed(e,XML.SAML_NS,"Statement")
>
> whereas the other two methods check
>
> if (!XML.isElementNamed(e,XML.SAML_NS,"Statement") ||
> !XML.isElementNamed(e,XML.SAML_NS,"SubjectStatement")
>
> ?

Bug, also pretty much meaningless since nobody would use xsi:type for them.

> Actually, I think all three should just check
>
> if ( !XML.isElementNamed(e,XML.SAML_NS,"SubjectStatement")

You have to check everything if you're trying to be pedantic about it.
There's nothing magical about the subtype.

> but I haven't been able to construct a unit test that causes any
> method to fail, so obviously I don't understand what's going on.

Just give AuthenticationStatement a DOM rooted in a SubjectStatement, it
should fail.

-- Scott




Archive powered by MHonArc 2.6.16.

Top of Page