aspose file tools*
The moose likes XML and Related Technologies and the fly likes Generate java classes for xsd importing other xsd Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Generate java classes for xsd importing other xsd" Watch "Generate java classes for xsd importing other xsd" New topic
Author

Generate java classes for xsd importing other xsd

Geeta Puttappanavar
Ranch Hand

Joined: Jan 18, 2012
Posts: 43
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

Joined: Jan 18, 2011
Posts: 509
    
    3
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

Joined: Jan 18, 2012
Posts: 43
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

Joined: Jan 18, 2011
Posts: 509
    
    3
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.
 
 
subject: Generate java classes for xsd importing other xsd