0

I have set up the following JAXRS service in:

@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. Any info is appreciated.

vhdz04
  • 159
  • 2
  • 17
  • What do you mean by "consume the resource in the back end"? Do you want another class to call this method and get the String result? – Yserbius Feb 12 '18 at 18:59
  • found the answer in this post: https://stackoverflow.com/questions/16456358/jax-rs-jersey-client-on-websphere-8-5 – vhdz04 Feb 12 '18 at 20:18

1 Answers1

1

answer: JAX-RS Jersey Client on Websphere 8.5

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

vhdz04
  • 159
  • 2
  • 17
  • 1
    That is correct, because WebSphere 8.5 implements JAX-RS version 1.1 which does not have the Client APIs. The Client APIs were added in JAX-RS version 2.0 which is available in WAS 9.0 and Liberty. HTH, Andy – Andy McCright Feb 13 '18 at 15:00