Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generate java classes for xsd importing other xsd

 
Geeta Puttappanavar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a requirement to import EXEC.xsd (which is child xsd) in NewAMOCORE.xsd (which is parent xsd) then to generate the java classes using xjc. I used binding.xjb. Even I tried catalog but I am not at all getting the solution.
Here is my code:


the command which i ran :


I got this error: cannot resolve the exec:EXECENTRY

What s the wrong? Is there any other approach to generate the java classes?

Thanks in Advance,
Geeta
 
g tsuji
Ranch Hand
Posts: 656
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From all angle, the schema set is defective.

Before any consideration of customization :
[1] if you mean an xml instance look like this,

then you change this.


[2] If you mean an xml instance look like this,

then change the imported xsd.
 
Geeta Puttappanavar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
g tsuji wrote:From all angle, the schema set is defective.

Before any consideration of customization :
[1] if you mean an xml instance look like this,

then you change this.


[2] If you mean an xml instance look like this,

then change the imported xsd.


Thanks a lot tsuji,
thats really helped me.
1st approach worked for me.
2nd approach also I tried but at

I am getting compile time error.

Thanks again,
Keep helping.
 
g tsuji
Ranch Hand
Posts: 656
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the second case, make sure you comment out xs:element completely leaving xs:complexType exposed as a top-level element in the imported schema, as I have shown explicitly (watch carefully). I think you have not done so correctly on your side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic