如果您的Web服务生成JSON,则必须使用以下
accept()方法在客户端中处理该JSON :
ClientResponse response = webResource.accept(MediaType.APPLICATION_JSON).post(searchQuery, MediaType.APPLICATION_JSON);ListWrapper listWrapper = response.getEntity(ListWrapper.class);
试试这个,并给出您的结果。

如果您的Web服务生成JSON,则必须使用以下
accept()方法在客户端中处理该JSON :
ClientResponse response = webResource.accept(MediaType.APPLICATION_JSON).post(searchQuery, MediaType.APPLICATION_JSON);ListWrapper listWrapper = response.getEntity(ListWrapper.class);
试试这个,并给出您的结果。