camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe San <codeintheo...@gmail.com>
Subject Camel Message Mapping to XML
Date Mon, 18 Feb 2013 20:37:59 GMT
Camel Users,

I have a scenario wherein I need to convert a message that I get from the
Camel exchange (MyObject.java) to an XML representation. The XML looks like
this:

<NVBuilder>
<Builder>
    <Name>SomeString</Name>
    <Value>SomeValue</Value>
</Builder>
<Builder>
    <Name>SomeString</Name>
    <Value>SomeValue</Value>
</Builder>
<Builder>
    <Name>SomeString</Name>
    <Value>SomeValue</Value>
</Builder>
.....
.....
</NVBuilder>

The Name and Value will be populated from the MyObject.java. The NVBuilder
does not have any XSD. But one thing that I know for sure is that the Name
fields are predefined. For example., there may be name fields like userId,
age, sex and so on. But in my Java Object (MyObject.java), the fields will
be userIdentification, gender and so on.

Now I need to map the fields in MyObject.java to the corresponding fields
in NVBuilder.xml with the appropriate values for those fields.

Any idea on how to leverage camel for the above scenario?

Regards,
Joe

Regards,
Joe

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message