users@jersey.java.net

[Jersey] Marshal XML using Jackson

From: Tristan Wehrmaker <3Stan_at_3Stan.net>
Date: Thu, 19 May 2011 16:23:00 +0200

Hi!

It might seem a little silly but I'm looking for a way to use Jackson to
(un)marshall xml.

With the POJOMappingFeature it's possible to marshal JSON using Jaxb
annotations but without using Jaxb itself, which gives me really nice
results.
So when I found an extension for Jackson, which allows to marshal XML
using Jackson (https://github.com/FasterXML/jackson-xml-databind), I
thought it would be nice to see what results this would produce and if
they would better suit my needs over Jaxb.

My question is now, what is the best way to write a provider for
application/xml thats using Jacksons XML databinding. In my attempts my
provider get's ignored and the Jaxb provider is used.

Regards
     Tristan