XSD uses external class, that defined in third party libraries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

XSD uses external class, that defined in third party libraries

aag031.maillist
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
Loading...