• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JaxB : Using Same Package For Two XSDs

 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy,

-- I have one parent xsd say Parent.xsd and one child xsd, say child.xsd
-- Now I have to import (not extend) Parent.xsd in child.xsd, so that i dont have to define some common tags those are in parent.xsd and use them directly in child.xsd
-- After doing the syntax part, I generated java objects using XJC tool of Jaxb.

Problem:-

Now if i provide same package for both xsd,then the ObjectFactory class is of the later xsd,so I have to give different package for both xsds
problem with that is, even though i don't have to define the common tags in child.xsd, the jaxb classes created for common classes are different due to different package, so at run time i cannot simply assign object of parent to child and vice versa.

any solution to this problem ?

-P
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic