Ian Carr wrote:
> If I create and marshal an instance of the class it produces the
> expected output:
>
> <X/>
>
> However if the accessor is invoked before marshalling it produces the
> following output, with an empty 'two' attribute:
>
> <X two=""/>
Ahhh, you are right. This is indeed problematic.
I think you can use a customization
<jaxb:property generateIsSetMethod="true" />
to generate the "unsetTwo" method, to work around this issue.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com