users@jaxb.java.net

XSD uses external class, that defined in third party libraries

From: <aag031.maillist_at_gmail.com>
Date: Wed, 11 May 2016 14:04:02 +0000 (UTC)

Hello

I've met with the following problem when we try to migrate from castor
to jaxb
I schould generate source code from XSD file where one type is defined
in third party library, so this type is unknown fo xjc task. but will
be available for javac task
For example

<xs:element name="ElementNamet" type="thirdpartylib:ElementType"
minOccurs="0" maxOccurs="unbounded" />

We have a jar file where this type is definded and javac will use it
via classpath. When we use castor for code generation. this problem is
noit observed, because of castor for this xsd element generate type
independency code for example

ArrayList ElementName

ElementName = new ArrayList()

So it operates wit Object type. I think that jaxb more type strongly
tool and provide more correctly type safety policy. Ny question is : Is
there a way to avoid this problem?

Thank you for advance
Alex