• 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

XSD to Jaxb conversion

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

I have 5 xsd files that has cascading structure ..which means the main XSD includes schemaLocation that refers to other XSD which in turn includes other 2 xsds.

In such cases how do I generate the JAXB objects?

For e.g. I have below 5 XSDs

xsd1
xsd2
xsd3
xsd4
xsd5

xsd1 is the main XSD which includes XSD 2 in schema location. XSD2 includes xsd 3 in schema location and imports xsd5.
Both Xsd 2 and xsd 3 imports Xsd5 as one of the schema locations.

and xsd5 refers to xsd4 as schema location. In that case how to I generate the JAXB objects for XSD1?


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

In that case how to I generate the JAXB objects for XSD1?


In order to understand what you mean by that, what do you not satisfy about when you compile xsd1 with xjc? Since you retain that knowledge that xsd1 includes xsd2 and xsd3 which may include/import xsd4 and xsd5 etc..., the xjc tool will automatically trace them, load them and compile them as well. If you start with xsd2, then effectively structures defined in xsd1 may be left out. But since you feed the xsd1, everything followed by the chain will be taken care of. So you should describe what you see as the problem(s) with that.
reply
    Bookmark Topic Watch Topic
  • New Topic