aspose file tools*
The moose likes Web Services and the fly likes How to marshall a number of generated classes into a single XML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to marshall a number of generated classes into a single XML file" Watch "How to marshall a number of generated classes into a single XML file" New topic
Author

How to marshall a number of generated classes into a single XML file

Mike Cheung
Ranch Hand

Joined: Feb 01, 2013
Posts: 96
Hi, I have used the "xjc" tool feeding it 3 XSD files and it generates a list of classes like...
Class1.java
Class2.java
.....
ObjectFactory.java

I'm not sure if I'm supposed to be using the ObjectFactory to create all the classes, because I am able to do something like the following. Looking inside the ObjectFactory class it appears to be doing the same thing anyway. So I continue to create classes to build the XML model I want to marshall out.


Towards the end of the code after I have done all the class generation, I have the following block of code but it's giving me the error that follows. Can someone please let me know what I have done wrong? Thanks.




shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
Could you please provide a sample xml and how you are generating from xjc? If possible, provide the complete code sample.

Let me try.
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 544
    
    3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to marshall a number of generated classes into a single XML file