• Post Reply Bookmark Topic Watch Topic
  • New Topic

XSD to Jaxb conversion  RSS feed

 
trupti nigam
Ranch Hand
Posts: 640
1
  • Mark post as helpful
  • send pies
  • 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?


 
g tsuji
Ranch Hand
Posts: 697
3
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!