OSGi中的Apache Wink客户端

时间:2012-11-02 05:06:44

标签: websphere osgi apache-wink websphere-liberty

我正在尝试在WebSphere Liberty Profile 8.5上运行的OSGi应用程序中使用Apache Wink Client:

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 Client?

1 个答案:

答案 0 :(得分:1)

我在任何方面都不具有权威性,但是IBM工作人员直接告诉我,他们使用WebSphere Web Services支持,那些org.apache.wink.server.internal.* Wink类无法访问,也无法访问。