users@jaxb.java.net

Re: no get and set methods generated

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Mon, 6 Oct 2008 17:21:39 +0200

An old xjc version (stamping the generated code with v2.0.2-b01-fcs
from 2006) doesn't
produce code from your type conditionsType that differs much from 2.1.8.

The schema type says that a conditionsType element may have identity, sphere,
validity and anything else as its children. The unmarshalled content
tree is supposed
to give you these subelements in the order they occur in the XML file.
That's why
JAXB binds them into a single list. You'll have to iterate over this
list and test
for the actual type.

Other than this, you might consider writing a type adapter and override the
default binding for conditionsType.

-W

On Mon, Oct 6, 2008 at 2:20 PM, Lulseged Zerfu
<lulseged.zerfu_at_ericsson.com> wrote:
> Hi
>
> When I used jaxb 2.1.3, I could easly pickup identity, sphere or validty
> from a conditionstype but not since I started using jaxb 2.1.8. I have to do
> a lot in my application to get this values.
>
> How can I generate so that I get a setX and getX methods. I want to have
> getIdentity(), getSphere() and getValidity() methods in side ConditionsType.
> Do I need a special binding?
>
> I have included a schema along with this e-mail.
>
> Lulseged
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>