users@jaxb.java.net

Re: Marshalling pb with abstract complex types

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 23 Mar 2004 17:38:26 -0800

> I used JAXB in extension mode in order to accept abstract complex types.
>
> I will take an example to be clear.
> A_type is abstract, and B_type and C_type are derived from A_type.
>
> However when marshalling a B_type data in a A_type element, I don't get the
> attribute xsi:type="B_type" which is required to be valid regarding the
> schema.
>
> Am I wrong somewhere when marshalling (option to set ?), or is it a bug ?

You also need to turn on the type substitution support extension. See
http://java.sun.com/webservices/docs/1.3/jaxb/vendorCustomizations.html#typesub

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net