users@jaxb.java.net

Re: Using JAXB to marshall/unmarshall xml digital signatures

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 30 Mar 2007 12:36:03 -0700

Liße wrote:
> Hi,
>
> I'm using JAXB 2.1 and I want to use it for binding of an xml message that contains a digital signature element.
> Using some customization I was able to generate corresponding java classes with xjc successfully.
> I have the requirementto preserve and persist the signature for future validation. Currently I think the best way to do this, is to save it
> as xml in the database.

> But what happens if I try to marshall my types back to xml? Will it break the signature?

If you are reading a signed document, modified it, and write it back,
you'll most likely to break the signature, no matter what technology you
use it.

If you are just reading a signed document for the purpose of getting
some values out, then you don't need to marshal that tree back at all
--- better to use the original infoset that you started with.


> Does JAXB work with xml signatures?
> I would be glad for any help and recommendations!
>
> With kind regards,
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com