This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Mike Cheung
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 697
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!