• Post Reply Bookmark Topic Watch Topic
  • New Topic

issue JAXB XSD to Java Class conversion.

 
suresh sargar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I know that this not a JAXB blog, but i feel this might be right palce to discuss about JAXB issue.

I am facing issue JAXB XSD to Java Class conversion.

i have more than 10 XSD which are internally reference to each other. for 2 XSD the complex object have same name causing name conflicts issue.

As a remedy for this i prefer to go with external ( binding.xjb) i specified both XSD with the field while running through Maven i am getting error like mentioned .XSD is not under compilation path.

I don't understand which compilation path it referring to...

pom.xml have correct entry for XJC- tag and even i have specified schema and binding tag into it, but doesn't understand what compilation path it's look for.

Please comment.
 
Marcus Biel
Ranch Hand
Posts: 51
IntelliJ IDE Mac OS X Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, without further details, we would have a hard time helping you -
however, to try it from a different angle - what I usually see is people don't understand how the whole XSD / Class mapping works, and therefore they autogenerate the classes,
which actually makes the situation worse, because now besides needing to understand how this mapping actually works you need to invest time in setting up (and understanding)
the class generation. Why not instead investing the time to once and for all understand uow XSD / Class mapping works, and then do it manually?
You will have much nicer, cleaner classes, which you can even use and extend as needed, like adding some boolean methods (and or small business methods) that help you to query the state of the input coming in.
For autogenerated classes, you will have stupid getter setter beans that can't be adjusted and serve no further purpose. You will have to map them to your business domain -
in the end you will do much more work then you would have without auto code generation.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!