Have you double-checked that AreaInfo is able to be found by a ContextResolver? I've seen lots of situations that don't throw exceptions, but that work strangely when you have a JAXB object that is not "registered" with a @Provider. Jersey seems to be doing its best with some kind of default behavior or something.
If that's not the problem, perhaps the generic may be the problem. Could you implement a non-generic subclass of ListInfo, such as:
@XmlRootElement(name="ListInfo")
public class AreaListInfo extends ListInfo<AreaInfo> {}
Then return AreaListInfo instead of ListInfo<AreaInfo>. I'm not sure, but that might do the trick.
On Apr 28, 2011, at 12:07 AM, Jairo1 wrote:
> I have the similar problem with NULL response.
> I get the response from REST server using 'ClientResponse' approach.Based on
> response type (JSON or XML is accepted) I'm unmarshaling received data. I
> see the data are correct in String presentation but if I try to unmarshall
> the JSON data - NULL List is resulted (even
> 'JSONConfiguration.FEATURE_POJO_MAPPING' is not a solution).
> In case of XML unmarshalling everything works file.
>
> Maybe somebody solved this issue in the past.
> Thanks.
>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Jersey-jaxb-and-Lists-tp6309856p6312232.html
> Sent from the Jersey mailing list archive at Nabble.com.