Transform POJO/XML into another POJO/XML using Freemarker ????

cmoulliard <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi,

I would like to know if it makes sense to use Freemarker to transform/map a
POJO into another POJO (idem but for XML to XML) ?

If this is the case, How can I achieve this ?

Reason : We have a solution able to process different messages in entry but
created according to different format (csv, fixed-length, XML, ...). The
existing solution has been designed around a commercial solution but my boss
would like to avoid to use it in the future. So, two scenario exist today to
process the messages and tranform them to fit the information into our
internal data model which is generic for all the messages

1) XML to XML
Transform (or encapsulate) all the incoming messages into a XML stream. Next
map/transform the XML message into an internal XML (= Data Model) stream
(this is why I have to map/transform various XML format into a XML one). Use
JAXB to map the XML towards our entities beans used by hibernate to commit
the information into the database

2) POJO to POJO
Transform all the incoming messages into POJO objects. Map/Transform the
POJOs into another POJOs (= entities beans used by hibernate) representing
our datamodel. Apparently Dozer is an interesting tool to map/transform
object into another object but paint full to use/debug.

Regards,

Charles
-- 
View this message in context: http://www.nabble.com/Transform-POJO-XML-into-another-POJO-XML-using-Freemarker------tp18213262p18213262.html
Sent from the freemarker-user mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.