java restful服务客户端接受响应列表

java restful服务客户端接受响应列表,java,rest,Java,Rest,我正在尝试为restful资源编写java客户机。对我的请求的响应是一个对象列表。我有以下请求代码。但我有一些例外。有人能告诉我怎么解决这个问题吗 GenericType<List<Response>> genType = new GenericType<List<Response>>() {}; GenericType<List<Response>> response = (GenericType<List<

我正在尝试为restful资源编写java客户机。对我的请求的响应是一个对象列表。我有以下请求代码。但我有一些例外。有人能告诉我怎么解决这个问题吗

 GenericType<List<Response>> genType = new GenericType<List<Response>>() {};
 GenericType<List<Response>> response = (GenericType<List<Response>>)resource.path(paramPath).accept(MediaType.APPLICATION_JSON).get(genType);
GenericType genType=new-GenericType(){};
GenericType响应=(GenericType)resource.path(paramPath).accept(MediaType.APPLICATION_JSON).get(genType);
我的资源有以下代码

@GET
@Path("/app/{Id}")
@Produces(MediaType.APPLICATION_JSON)
public List<Response> getAllKeyValuesByAppId(@PathParam("Id") Long Id){
    ...
    ...
}   
@GET
@路径(“/app/{Id}”)
@产生(MediaType.APPLICATION_JSON)
公共列表getAllKeyValuesByAppId(@PathParam(“Id”)长Id){
...
...
}   

您能在不解组的情况下测试REST方法吗?
您确定消息正文完全包含您期望的内容吗?

您能在不解组的情况下测试REST方法吗?
您确定消息正文完全包含您期望的内容吗?

什么是
响应
类?您能给出异常的堆栈跟踪吗?我假设您使用Jersey作为REST框架,Jackson用于编组/解编?Response类是我的用户定义类什么是
Response
类?您能给出异常的堆栈跟踪吗?我假设您使用Jersey作为REST框架,Jackson用于编组/解编组?响应类是我的用户定义类