users@jaxb.java.net

Can't use an element of an abstract type

From: Brian Hannan <bhannan_at_mac.com>
Date: Sat, 12 Apr 2003 16:28:17 -0700

I've defined a complex type A which has an element of another complex
type B. The contained complex type B is defined as abstract. This is
quite useful to me as a way to permit various subtypes of B contained
in A, just as it would if B were an abstract class in Java.

However, JAXB complains if I define an element of type A because type B
is abstract. Why is this? Seeing how Java has a clear understanding
of abstract classes, why doesn't this apply when translating schemas to
Java?

Cheers.

--
Brian Hannan
Chief Admiral of Uncle Jam's Navy
"One nation under a groove, gettin' down just for the FUNK of it."