users@jaxb.java.net

Re: [jaxb-1.x] Marshalling just a type without nested elements produces empty string

From: Kostis Anagnostopoulos <ankostis_at_gmail.com>
Date: Sat, 1 Jul 2006 10:12:22 +0300

On 7/1/06, Dmitri Colebatch <dim_at_colebatch.com> wrote:
> Hi Kostis,
>
> You're asking two questions here. The first one relates to what code
> xjc generates for you, and the second relates to how jaxb2 handles
> classes that don't have @XmlRootElement annotations.
>
> The answer to the first is that xjc will generate classes with
> @XmlRootElement for any global elements defined in your schema.
>
> The answer to the second is (I think) that if you try to marshall an
> object of class Foo where Foo doesn't have a @XmlRootElement
> annotation jaxb2 won't marshall the class.
>
> does that help?

Hi Dimitri, and thank you for your effort to answer,

that would help...if i was using JAXB 2.x. But i forgot to mention
inside my mail's body that i was referring to jaxb-1.x (it is refered
only on the subject).

Nevertheless, my mail did not contain questions, but rather bug
reports (fix marshalling behavior and amend release notes).

I thank you again, and i apologize for taking up your time (unless you
are also maintaining the jaxb-1.x codebase, in which case, you might
find appropriate to re-respond).

  Kostis

>
> cheers
> dim