【问题标题】:Restlet Client using JAX-RS annotated resources使用 JAX-RS 注释资源的 Restlet 客户端
【发布时间】:2015-05-27 16:59:55
【问题描述】:

我正在编写一个restlet 客户端,它将调用一些Resteasy 编码的rest 服务(不能更改服务器代码,因此不能使用Restlet 注释资源的方式)。 资源接口使用 JAX-RS 注释并且有多个 @POST 方法(Restlet 在处理这个问题时最大的问题之一)。

我试图以这种方式实现: IAppLoginResource resource = JaxRsClientResource.createJaxRsClient("http://localhost:9090/rest", IAppLoginResource.class); final GetLoginAppInfoResponse response = resource.getLoginAppInfo( getLoginAppInfoRequest );

问题是默认请求是GET,我没有找到像使用ClientResource时那样指定请求方法的方法(我不能使用,因为我需要处理JaxbRepresentation和Jaxb问题)。

任何使用 JAX-RS 注释资源实现 Restlet 客户端的代码示例/sn-p?

有什么想法吗?

谢谢,

【问题讨论】:

    标签: java android jax-rs restlet


    【解决方案1】:

    我为此主题输入了一个问题: https://github.com/restlet/restlet-framework-java/issues/1081

    我已经根据您的代码测试了一个示例应用程序,它使用当前的 2.3 分支(未来的 2.3.3)可以正常工作。我想知道这个问题的修复 https://github.com/restlet/restlet-framework-java/issues/1072 是否有帮助。

    关于文档,我将完成当前页面 (http://restlet.com/technical-resources/restlet-framework/guide/2.3/extensions/jaxrs),参见此问题:https://github.com/restlet/restlet-framework-java/issues/1084。 你也可以看看 org.restlet.test 项目,尤其是这个包https://github.com/restlet/restlet-framework-java/tree/2.3/modules/org.restlet.test/src/org/restlet/test/ext/jaxrs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-13
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      • 2016-12-06
      相关资源
      最近更新 更多