Reputation: 83
I would like to how to extend/inherit Objectfactory
.The scenario is very simple.
suppose i have xsd_A
which defines a complextype address
. There is another xsd_b
which imports xsd_a
and references address
or it create element of type address
. i have few requirements
i would like the objectfactory
of xsd_b
to extend xsd_a
and avoid redefining createAddress()
.
how is it possible? i would like not to have Address.java
in package xsd_b
. i would like all classes in xsd_b
to reference Address.java
generated by xsd_a
.
Note the class refers the address
generted by xsd_a
.
Upvotes: 1
Views: 668
Reputation: 149017
If you want to reuse the classes generated from xsd_a when you generate classes from xsd_b (which imports xsd_a) is to use the episode file extension in XJC. For a full example see my answer to a similar question.
Upvotes: 2