XML payload & JMS

This will be done from one of our POJO class after it performs some business validation. In this class I have the content in a Java Object which has a big Object tree. I have to convert this Java Object into XML.

My question to you all is

Should i perform this Java Object to XML conversion logic in the POJO class itself. Because the Java object can vary depending upon situation to situation.

As the JMS Topic takes in a XML content I would want to know what would be the most effecient way of converting this Java object into XML & sending the XML to the JMS topic.

Kindly respond

Mahesh

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com