• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java XML to Object Mapping and Back  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on a system which accepts an XML file and converts the file into local Java Bean type objects for further processing. On completion of processing the system converts the Java Beans into a response XML file and returns the file to the client. I am using Castor to perform the mapping from XML to Object and back to XML. This has been fine until now, but the messages are becoming increasingly complex which is resulting in a mapping file which is hard to read and maintain.

Can anyone please give advise on an alternative to Castor? Preferably one which has a GUI so that I don't have to code mappings by hand. The tool would have to cope with complex data structures and features such as interface/abstract reference variables.

Thanks.
 
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XStream doesn't need any configuration, and can also quite easily convert to and from XML.
 
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another option is JAXB, which lets you do the configuration using annotations on the Java classes. Some people really dislike this pattern, though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!