我正在尝试在 WebSphere Liberty Profile 8.5 上运行的 OSGi 应用程序中使用 Apache Wink 客户端:
org.apache.wink.client.ClientConfig clientConfig = new ClientConfig();
org.apache.wink.client.RestClient client = new RestClient(clientConfig);
org.apache.wink.client.Resource resource = client.resource(uri);
org.apache.wink.client.ClientResponse response = resource.get();
System.out.println(response.getEntity(String.class));
编译器在调用 ClientResponse.getEntity() 时产生以下错误:
The type org.apache.wink.client.internal.BaseRequestResponse cannot be resolved. It is indirectly referenced from required .class files
ClientResponse 似乎扩展了 org.apache.wink.client.internal.BaseRequestResponse,它不包含在 com.ibm.websphere.appserver.thirdparty.jaxrs 的 Export-Package 声明中。
是否可以在 OSGi 应用程序中使用来自 jaxrs-1.1 功能的 Apache Wink 客户端?