Questions tagged [jersey-client]

The Jersey client API is a high-level Java based API for interoperating with RESTful Web services.

The Jersey client API is a high-level Java based API for interoperating with RESTful Web services. It makes it very easy to interoperate with RESTful Web services and enables a developer to concisely and efficiently implement a reusable client-side solution that leverages existing and well established client-side HTTP implementations.

More Details

820 questions
4
votes
4 answers

Rest client java.net.ConnectException: Connection timed out: connect

Hi i have a Spring Rest Webservice deployed in the weblogic service. I have advance rest client of google chrome which work perfectly over https I am trying to create to Client over https Client. I have ca certificate and client certificate. I…
ramesh027
  • 796
  • 1
  • 10
  • 27
4
votes
1 answer

Jersey 2 client for StreamingOutput

I have a Jersey service that output binary data as StreamingOutput, MediaType.APPLICATION_OCTET_STREAM. How to implement a client using Jersey 2 for handling the response from such service?
sunish
  • 61
  • 3
4
votes
4 answers

How do I tell the Jersey Client to do the equivalent of @JsonIgnoreProperties(ignoreUnknown = true) on every class it deserializes?

I have a class that I'm using the Jersey Client to deserialize. This class has a method that looks like this: public boolean isEmpty() { return (code == null && label == null && codeSystem == null && …
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
4
votes
1 answer

Jersey @Consumes @Produces not accepted by the server ,

I have the following class : package test import org.apache.log4j.Logger; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @Path("/test") public class test { private static Logger logger =…
user1801279
  • 1,743
  • 5
  • 24
  • 40
4
votes
1 answer

Purpose of jersey-server, jersey-client, jersey-grizzly in RESTful application

I am trying to create a basic RESTful application using Maven,Apache Tomcat 7.0, Eclipse IDE. I came across the usage of maven dependencies like jersey-server, jersey-client, jersey-grizzly etc in some of the sample codes available in google. I…
RamSri
  • 53
  • 3
  • 8
4
votes
2 answers

AbstractMethodError on UriBuilder when upgrading Jersey client 1.x to 2.x

We're in the process to upgrade our Web application (running on Tomcat7) from Jersey 1.7 to Jersey 2.4.1. I managed to have the server-side working now, but the JUnit tests which are using jersey-client are throwing the…
Pepster
  • 1,996
  • 1
  • 24
  • 41
4
votes
2 answers

Jersey REST get returns java.lang.NoSuchMethodError

I'm trying to get a response from a working REST webservice. I have come up with the following looking at the documentation: void postRest() { Client client = ClientBuilder.newClient(); WebTarget webTarget =…
dendini
  • 3,842
  • 9
  • 37
  • 74
4
votes
1 answer

Reuse authorization header to prevent multiple 407 proxy authentication challenges with Jersey Client

I am using the Jersey Client 2.0 library (with Apache HttpClient v4.2.5 transport connector) to consume a RESTful web service. My application must support connections via a proxy server with any of Basic, Digest or NTLM authentication. I have added…
4
votes
1 answer

is there a way to invoke HTTP PATCH on a REST service from client using Jersey Clinet

I am trying to figure out how to invoke/call PATCH method provided by a service from the client through Java program using Jesrey Client. I have tried a lot of ways and read many things online. But, it seems like this is not supported in jersey yet.…
ajay
  • 161
  • 1
  • 1
  • 5
4
votes
1 answer

failed to read cookies from Jersey clientresponse on Android

I have a web application that does authentication and then checks for a cookie in request to allow the subsequent calls from the same client. I have written a piece of code which works just fine when I run it from eclipse, but fails when run from…
Srini Kandula
  • 981
  • 2
  • 18
  • 47
4
votes
3 answers

Jersey should not consume any form parameter. exception

I am building rest webservice using jersey, when I add this function i got this exception, but when i remove it, the server works very…
user2228656
  • 317
  • 1
  • 3
  • 7
3
votes
1 answer

Jersey not showing response in case it was an error

I have the following problem... I'm testing a service that return HTTP responses on GET requests. My problem is that I would like to view the response even if it was an HTTP 500 / 404 or whatever response. I would like to view that. But I can't…
Hannibal
  • 1,078
  • 2
  • 12
  • 24
3
votes
1 answer

Jersey Client: Authentication fails at redirect by Jenkins

I am attempting to use the REST api of Jenkins. Jenkins requires a POST request to a URL to delete a job. This results in the following: I tell my chosen Client to send a POST to the appropriate URL. The client sends a POST and authorizes itself…
MrThaler
  • 124
  • 8
3
votes
0 answers

JAX-RS2 client response filter for bad connection error cases

In JAX-RS2 based clients there are two extension points for request processing: javax.ws.rs.client.ClientRequestFilter and javax.ws.rs.client.ClientResponseFilter. Both of them will be invoked while on a happy path. But when there's a connectivity…
Alex
  • 7,460
  • 2
  • 40
  • 51
3
votes
1 answer

How to turn off template parameter matching in Jersey Client?

Can anyone advise on how to turn off template variable matching in Jersey Client? org.glassfish.jersey.client.JerseyClient When preparing a GET request that contains text such as: /api/users/{$USER_ID}/firstname it will throw an Exception like…
Mobigital
  • 749
  • 7
  • 14