我收到了这个错误
A message body reader for Java class java.util.List, and Java type java.util.List<Entities.service.GroupU>, and MIME media type text/html was not found
执行此代码时
GroupUClient client1 = new GroupUClient();
ClientResponse response = client1.findAll_XML(ClientResponse.class);
GenericType<List<GroupU>> genericType = new GenericType<List<GroupU>>() {
};
// Returns an ArrayList of Players from the web service
data = new ArrayList<GroupU>();
data = (response.getEntity(genericType));
有什么问题?
答案 0 :(得分:0)
我删除了所有生成的类和所有的restful类以及GroupUClient,然后程序运行没有问题。
从
改变public ChatuserClient() {
com.sun.jersey.api.client.config.ClientConfig config = new com.sun.jersey.api.client.config.DefaultClientConfig();
client = Client.create(config);
webResource = client.resource(BASE_URI).path("entities.chatuser");
}
到
public ChatuserClient() {
com.sun.jersey.api.client.config.ClientConfig config = new com.sun.jersey.api.client.config.DefaultClientConfig();
client = Client.create(config);
webResource = client.resource(BASE_URI).path("entities.service.chatuser");
}