Hi all,

I know this not necessarily CXF specific but I though some here may have the experience to give me some hints. I checked the JAXB list and saw a similar question but it went unanswered.

I want to marshall a map to XML which I can do follow the many articles on the internet and using a XmlAdapter. Which gives me something like:

<mapHolder>
        <txnMap>
                <txnMapEntry blah="version">111</txnMapEntry>
                <txnMapEntry blah="request">PULL</txnMapEntry>
                <txnMapEntry blah="srcId">4080263668</txnMapEntry>
        </txnMap>
</mapHolder>

However I want the XML to look like:

<txnMap>
        <version>111</version>
        <request>PULL</request>
        <srcId>4080263668</srcId>
</txnMap>

I have tried a million different combinations of annotations to experiment. I also would not be at all opposed to using ASM to transform or write new byte code into classes but I just don't know the correct approach to take or if this is really possible at all. Should I let JAXB rip out any xml it wants and then transform it some place else in the CXF pipeline? Anyone have experience here?

-Anthony

Reply via email to