Skip to Content.
Sympa Menu

mace-opensaml-users - RE: [OpenSAML] OpenSAML 2.0 custom data type help

Subject: OpenSAML user discussion

List archive

RE: [OpenSAML] OpenSAML 2.0 custom data type help


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: <>
  • Subject: RE: [OpenSAML] OpenSAML 2.0 custom data type help
  • Date: Mon, 9 Feb 2009 16:50:39 -0500
  • Organization: The Ohio State University

Brent Putman wrote on 2009-02-09:
> Right, since AttributeValue is defined as an xs:anyType, we don't supply a
> concrete implementation of AttributeValue.

I do, but its implementation is nothing more than an ElementProxy (my XSAny)
that defaults the element name.

> Either you
> write one, or you could use an XSAny that supports an open content model of
> any attribute and any child element.

Which is where we sort of diverge, I think, because I consider that a
natural/logical thing to do and would actually document that as the solution
for most people to use for simple cases. Type safety has value, but so does
expedience. What matters is that the XML is handled safely and that
signatures hold. If it weren't for signatures and encryption, none of this
code would exist, in fact, because it's too thin a wrapper around the DOM to
add value otherwise.

> I would say, though, that if you do have a formal schema and type model,
> etc, that you probably want to go ahead and implement providers for them.
> At least in my head, that lends itself to more conceptual correctness. I
> mean, we could use XSAny for just about everything at a functional level,
> but we don't. It's mostly intended to support unmarshalling unknown types
> that you receive, and provide access to the content model in an open
> fashion. It's not really for building and marshalling things in your own
> code (although it can function that way).

The problem is that with things like AttributeValue, where use of xsi:type is
discouraged, you *will* (I think) get an XSAny on the way back in. So the
cost of creating the code has to be balanced by that.

-- Scott





Archive powered by MHonArc 2.6.16.

Top of Page