I've done this by using JAXB to build the full unencrypted XML, then
marshalling to a org.w3c.dom.Document and using XML Security library to
perform encryption on the Document object.

I realise this may not be the best solution in all cases, especially if
you need to get the Document back into JAXB again (could be a
significant performance impact). It worked well for me because I could
do the encryption as the final step before returning the XML to the
caller.


-----Original Message-----
From: Dave Hoffer [mailto:[EMAIL PROTECTED] 
Sent: November 7, 2007 9:40 AM
To: security-dev@xml.apache.org
Subject: XML Security & JAXB


We have a schema we bind to Java using JAXB (and C++ with LMX) which
works well.  I know have been asked to encrypt certain element data. How
can I do this and not loose the schema to POJO binding?

What is the best way to accomplish this?
Does XSD support XML Security in some way?
Does JAXB or other binding implementation support XML Security?

-Dave


Reply via email to