0

我收到了这个错误

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));

问题是什么 ?

4

1 回答 1

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");
    }
于 2013-06-11T11:06:40.497 回答