Configure for maps of JAXB Objects
Your parameter or method return type must be a generic with a String as the key and the JAXB object's type. @XmlRootElement(namespace = "http://foo.com") public static class Foo { @XmlAttribute private String name; public Foo() { } public Foo(String name) { this.name = name; } public String getName() { return name; } } @Path("/map") public static class MyResource { @POST @Produces("application/xml") @Consumes("application/xml") public Map post(Map map) { Assert.assertEquals(2, map.size()); Assert.assertNotNull(map.get("bill")); Assert.assertNotNull(map.get("monica")); Assert.assertEquals(map.get("bill").getName(), "bill"); Assert.assertEquals(map.get("monica").getName(), "monica"); return map; } } The above resource can publish and receive JAXB objects within a map. By default, they are wrapped in a "map" element in the default namespace. Also, each "map" element has zero or more "entry" elements with a "key" attribute.