title: How do I get CXF to understand a Map<String, <List<MyBean>>?
body: <p>My restful method returns a <code>Map&lt;String,List&lt;MyBean&gt;&gt;</code> but I can't figure out how to get CXF and JAXB to serialise this as XML.</p>
  
  <p>I want it to look something like this (although I'm not all that bothered how it is serialised so long as it works on both sides);</p>
  
  <pre><code>&lt;response&gt;
    &lt;items key="a"&gt;
      &lt;item&gt;
        ....
      &lt;/item&gt;
      &lt;item&gt;
        ....
      &lt;/item&gt;
    &lt;/items&gt;
    &lt;items key="b"&gt;
      &lt;item&gt;
        ....
      &lt;/item&gt;
    &lt;/items&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>If I just return a <code>Map</code> I get;</p>
  
  <blockquote>
    <p>[org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor]
    No message body writer has been found
    for response class HashMap.</p>
  </blockquote>
  
  <p>If I try and use a wrapper object I get;</p>
  
  <blockquote>
    <p>[org.apache.cxf.jaxrs.provider.AbstractJAXBProvider]
    java.util.List is an interface, and
    JAXB can't handle interfaces.</p>
  </blockquote>
  
  <p>Any suggestions? Is this just a CXF issue (I'm using version 2.3.2)? I'm sure I've had a similar thing working in Jersey.</p>