简体   繁体   English

在Java,IBM中获取JAXRS结果

[英]Get JAXRS result in java, IBM

I have set up the following JAXRS service in: 我在以下位置设置了以下JAXRS服务:

@Path(value="/validationService")
public class ValidationService {

    @GET
    @Produces(value="text/plain")
    @Path(value="{token}")
    public String getPropety(@PathParam("token") String token) {
     String status = AuthenticationManager.getInstance().getTokenStatus(token);
     return status;
    }

} }

If I hit the url, I receive the proper response on my screen. 如果我点击该网址,则会在屏幕上收到正确的响应。 How can I consume this resouce in the back end? 我如何在后端使用这种资源? I have set this up using jersey jars and the Cient / CLientBuilder / WebTarget procedure, using TOMCAT, but this does not seem to work with WebsphereApplicationServer 8.5. 我已经使用球衣罐和使用TOMCAT的Cient / CLientBuilder / WebTarget过程进行了设置,但这似乎不适用于WebsphereApplicationServer 8.5。 Any info is appreciated. 任何信息表示赞赏。

answer: JAX-RS Jersey Client on Websphere 8.5 回答: Websphere 8.5上的JAX-RS Jersey客户端

I was using the incorrect libraries to perform these operations. 我使用了不正确的库来执行这些操作。 I was using: javax.ws.rs to build the client, when I should've been using: org.apache.wink 我应该使用:org.apache.wink时,使用javax.ws.rs来构建客户端

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM