title: RESTEasy @WrappedMap
body: <p>I am using RESTEasy to write a RESTful web service and trying to write a response that contains a HashMap.  The web service produces either JSON or XML.  The JSON map is correct, but the XML map has no content.  The RESTEasy @WrappedMap annotation is supposed to marshal Maps to XML.</p>
  
  <pre><code>@XmlRootElement(name="Response")
  public class RootResponse {
    private HashMap&lt;String, String&gt; test;
    public RootResponse() {
      test = new HashMap&lt;String, String&gt;();
      test.put("Fred", "Wilma");
      test.put("Barney", "Betty");
    }
    @XmlElement
    @WrappedMap(map="test", key="name", entry="spouse")
    public HashMap&lt;String, String&gt; getTest() {
      return this.test;
    }
  }
  </code></pre>
  
  <p>JSON output:</p>
  
  <pre><code>{
    "test": {
      "Fred": "Wilma",
      "Barney": "Betty"
    }
  }
  </code></pre>
  
  <p>XML output:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;Response&gt;
    &lt;test/&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p>I get the same output if I leave out the @WrappedMap annotation.</p>
  
  <p>Does @WrappedMap not work for properties?</p>