santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucas, Mike" <>
Subject RE: XML Security & JAXB
Date Thu, 08 Nov 2007 14:51:41 GMT

> I see how you can read and decrypt an XML file.  Can you then 
> take this Document and feed it to JAXB to get POJOs?  
Yes - JAXB Unmarshaller.umarshal accepts a Document object.

> You mention that the XML Security library will modify the 
> Document object which is what I would expect.  Do you then 
> have either a Document object or XSD that is usable by JAXB 
> to generate POJOs?
Yes, this modified Document (with all encrypted elements decrypted) can
be passed to JAXB Umarshaller. (Note: XSDs are used by JAXB when you
*generate* your JAXB code; after that JAXB kind of internalizes the
XSDs. You don't need to be passing around or modifying XSDs at runtime.)

> What about the reverse?  Can you generate the encrypted XML 
> using this approach?
Yes, the reverse can work like this: 1) build JAXB object tree, 2)
marshal it to DOM Document, 3) encrypt the elements in the DOM that need
to be encrypted. Also, if you need you can add 4) digitally sign any
elements in the DOM that you want to sign.

> What SAML library do you use?
Nothing other than the XML Security library. We looked at OpenSAML but
at the time it wasn't released for SAML v2.

- Mike

View raw message