1

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.

skaffman
  • 398,947
  • 96
  • 818
  • 769
user1141359
  • 83
  • 1
  • 7
  • Do you actually mean `xsd_b` does an `` on `xsd_a`, or did you mean ``? The difference is critical. – skaffman Jan 11 '12 at 19:31
  • xsd b import xsd a and then does .Now i dont want address to be created in java package b.but it should be imported in java class from package a.Episode is the answer and it worked. :) thanks for asking. – user1141359 Feb 10 '12 at 14:59

1 Answers1

2

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.

Community
  • 1
  • 1
bdoughan
  • 147,609
  • 23
  • 300
  • 400
  • Thanks .It works.Sorry for my late response .But I am unable to use Typesafeenum in XSD as internal jaxb binding info.It complains of conflicting configuration. – user1141359 Jan 20 '12 at 12:08