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
1 answer

Provider org.glassfish.jersey.client.JerseyClientBuilder could not be instantiated

I have a Android project that implements the Jersey client. I am presented the an exception when I execute the line: Client client = ClientBuilder.newClient(); Here are my gradle dependencies: dependencies { implementation fileTree(dir: 'libs',…
Hendré
  • 262
  • 10
  • 27
4
votes
1 answer

Odoo ERP java API Client with jersey Library

Java API Client for Odoo API not working while adding session_id in the header. My code is here. I am using Java jersey Library ClientConfig clientConfig = new…
jaleel
  • 1,169
  • 8
  • 22
  • 46
4
votes
0 answers

How can I read the response using the jersey client

I have seen examples (and they work with other objects, like String) How to get list as response from jersey2 client So, I have a method that response to my endpoint like this: return Response.ok(new CustomDto<>(param1,…
jpganz18
  • 5,508
  • 17
  • 66
  • 115
4
votes
1 answer

Disable Automatic Registration of JAX-RS Resources on WebLogic 12c / Jersey

WebLogic 12c includes a Default JAX-RS resource (https://docs.oracle.com/cd/E24329_01/web.1211/e24983/configure.htm#RESTF191) that will register all classes annotated with JAX-RS annotations as resources. I use the Jersey proxy client…
Mark Murfin
  • 776
  • 8
  • 19
4
votes
2 answers

bypass request via proxy is not supporting jaxws rs api

I am making a http request to external stream server; for that I am using jaxws-rs-api. I am able to make the request and getting response succesfully. but when I tried to make the request via proxy, it is not going through proxy (even not…
Ram Kowsu
  • 711
  • 2
  • 10
  • 30
4
votes
0 answers

Correct way to instrument a Jersey client

My goal is to instrument a Jersey client to collect data on HTTP response/execution time, and I had thought I had the right approach by implementing a JAX-RS ClientRequestFilter and a ClientResponseFilter with code in each to record the start and…
hayduke
  • 121
  • 8
4
votes
0 answers

Query parameter encoding using Jersey client

I am using Jersey client 2.25.1 and the queryParam(...) method does not correctly encode the values, e.g this approach fails: Response response = client.target(uri) .queryParam("a", "%20") // Translated into space ' '(!) …
keyoxy
  • 4,423
  • 2
  • 21
  • 18
4
votes
1 answer

How to disable chunked encoding and use buffered for Jersey 1?

I am encountering a HTTP response status of 411 Length Required when performing a call to a 3rd party service in my application. The problem seems to be related to chuncked encoding, switching it to buffered would solve the problem. There is a…
Flowryn
  • 1,437
  • 1
  • 16
  • 32
4
votes
1 answer

Using custom logging filter with LoggingFeature for Jersey Client.

I am using Jersey 2.22. I have registered a LoggingFeature that logs requests, responses, headers, payload, etc based on the verbosity that I set however I would like to implement my own custom logging filter that this feature will use. Looking at…
Half_Duplex
  • 5,102
  • 5
  • 42
  • 58
4
votes
1 answer

Jersey 2 - Simple Client Get with Headers Example

I'm trying to do a simple get with headers using Jersey2. I read through Jersey 2.x: How to add Headers on RESTful Client to help create my code below, but I'm not having much luck. I created the clientRequestFilter as suggested, but don't know how…
James Oravec
  • 19,579
  • 27
  • 94
  • 160
4
votes
1 answer

JerseyClient async calls seems to leave hanging threads

I'm using jersey-client-3.0-SNAPSHOT. I do something like: final Client client = createClient(); ... Builder builder = target.request(); for (final Entry entry : getHeaders().entrySet()) { builder =…
eduyayo
  • 2,020
  • 2
  • 15
  • 35
4
votes
1 answer

is there a way of configuring the level of jersey client request logging?

I am using jersey client 2.25 and I am logging my requests. I'd like an easy way to switch this logging on and off, preferably through a logging configuration file. I've tried putting a logging.properties files in the class path but this does not…
natke
  • 743
  • 1
  • 9
  • 21
4
votes
1 answer

Jersey Client throws "Cannot retry request with a non-repeatable request entity." when doing POST over proxy

In the following I'm using Jersey 2.25 to do a POST request over a proxy using ApacheConnector. Due to the proxy if I omit the configuration: config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); I will get…
Roland
  • 7,525
  • 13
  • 61
  • 124
4
votes
2 answers

Why is Jersey Client response giving garbage data?

I cannot figure out why my code is giving me garbage data when I read the Http Response entity. This is only happening when I issue a request to one specific URL with data that causes a 400 response. My code attempts to read the response entity,…
Joe Ernst
  • 508
  • 6
  • 18
4
votes
2 answers

JsonMappingException: Can not find a deserializer for non-concrete Map type

String str = commonClient.authorizedRequestBuilder(commonClient.webTarget .path("/apps/get_current_version/default/"+appName+"/"+appName) .queryParam("object_type", "app")) …
Elad Benda
  • 35,076
  • 87
  • 265
  • 471