Skip to Content.
Sympa Menu

mace-opensaml-users - RE: creating SAMLAssertion from DOM and time zones

Subject: OpenSAML user discussion

List archive

RE: creating SAMLAssertion from DOM and time zones


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: "'Rami Jaamour'" <>, <>
  • Subject: RE: creating SAMLAssertion from DOM and time zones
  • Date: Mon, 20 Dec 2004 14:12:51 -0500
  • Organization: The Ohio State University

> You are correct, I meant:
>
> formatter.setTimeZone(TimeZone.getTimeZone("UTC"));

Ok. Can you please file a bug on this?

> Regarding the DOM issue, well, I guess it is more of a DOM
> question than OpenSAML. In my situation I was constructing
> the DOM from a sample XML String (or from a file), so I was
> hoping just to pass it to SAMLAssertion without needing to
> clone since I do not plan to access the original DOM I give
> to it anymore (I am creating the DOM specifically for the
> SAMLAssertion).

That's legal, I do it all the time. I think the problem is maybe that
something *is* using the old DOM, or freeing it, or something. I dislike
Java because the whole thing is so "gray". With C++, I know exactly who owns
what and how to avoid errors. I'm guessing half the time here, so I might be
doing something unsafe (or you might be).

The assertion object will maintain a pointer to the root node you pass in
(the Assertion element). That's all it knows about, but it will use the
existing document (via node.getOwnerDocument()) to make any changes later.

If you call toDOM() later, it will typically just reserialize that DOM node
(the DOM is already built), but it does use c14n to do that. Which does make
changes to the document in some cases.

-- Scott




Archive powered by MHonArc 2.6.16.

Top of Page