users@jaxb.java.net

Re: Need an external binding file that makes all classes serializable

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Wed, 10 Feb 2010 08:27:43 +0100

There is no particular reason why all the classes generated from a schema
should not have the same SUID. But classes from different versions of a
schema should have different SUIDs.

Generating an .xjb from the schema with a SUID derived from the
schema shouldn't be too difficult. Here's a quickie for starters:

 openssl dgst -md5 -binary my.xsd | cut -d' ' -f2 | od -td8 | head -1 | cut
-d' ' -f3

Add a few echo's and that's it.

-W


On Tue, Feb 9, 2010 at 6:28 PM, KARR, DAVID (ATTSI) <dk068x_at_att.com> wrote:

> I'm trying to construct a very simple external binding file, which just
> makes all generated classes serializable, irrespective of which schema
> is referenced. In the samples I've seen, they all have a
> "schemaLocation" attribute in the top level "jxb:bindings" element.
> That isn't quite what I need. Can I just put the "globalBindings"
> element inside the root "bindings" element? In addition, it seems like
> I have to specify a constant value for the serializable uid. Is it
> really going to generate each class with the same serializable value?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>