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
2
votes
2 answers

415 error while calling post API from jersey client

I have below API which returns back the access_token. POST https://idcs-xxxxxxxxxbf08128c3d93a19c.identity.c9dev2.oc9qadev.com/oauth2/v1/token in header content-type is application/x-www-form-urlencoded. also in body it contains below parameter. I…
Shruti sharma
  • 199
  • 6
  • 21
  • 67
2
votes
1 answer

Caused by: java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts

i am using jjwt-0.9.1.jar and runtime gives this exception for jersey reset API call. When i use this code using java main() method, its works perfectly but when i call from servlet to that class, the method throws exception. import…
2
votes
1 answer

how to ewquest Delete method with json body in Jersey client

I am writing a test program to test the jersey client to have json body in it. I am getting the response with postman and trying to call it from java jersey client but getting error as java.lang.IllegalStateException: Entity must be null for http…
Programmer
  • 117
  • 2
  • 14
2
votes
1 answer

Java Jersey client - upload 1Gb file with 256Mb client JVM heap

I'm using Jersey 2.28 and want to write a client to upload 1Gb files, while the client JVM heap cannot go above 256Mb. What are my options here? I've tried with the snippet below but getting OOM as it seems Jersey keeps reading as much as it can…
m42
  • 33
  • 4
2
votes
0 answers

Jersey Client: Logging HTTP Redirects

I'm using JAX-RS with Jersey. When sending a POST request to an API, I receive a 302 and Jersey follows automatically which results in a 403. In my logging, however, I can only see the failed responses: INFO Rest-Request: POST…
MrThaler
  • 124
  • 8
2
votes
1 answer

Use Apache HttpClient with caching enabled as Jersey 2 client

How can I use a custom configured Apache HttpClient with Jersey Client 2? HttpClient with Caching (from apache docs) CacheConfig cacheConfig = CacheConfig.custom() .setMaxCacheEntries(1000) .setMaxObjectSize(8192) …
Marc Stroebel
  • 2,295
  • 1
  • 12
  • 21
2
votes
0 answers

Add @QueryParam to JAX-RS existing API in a backward compatible way for JerseyClient

I have an existing API. @Api @Path("/resourceA/v1") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public interface ResourceA { @GET @Path("{id : .+}") getResourceById(@PathParam("id") String id); } We have…
Baptiste Pernet
  • 3,318
  • 22
  • 47
2
votes
1 answer

Convert Jersey Client to HttpUrlConnection

I have a Jersey client that retrieves a jwt token from an API. This is the code public static final String INFO_ENDPOINT = "http://10.1.9.10:7100/Info/"; private static final String INFO_USERNAME = "user"; private static final String INFO_PASSWORD =…
adbdkb
  • 1,897
  • 6
  • 37
  • 66
2
votes
0 answers

Whether jersey’s concrete class org.glassfish.jersey.client.ClientConfig can be used along with javax.ws.rs.client.ClientBuilder

I have question related to cxf-rt-rs-client-3.3.1. Background : I am working on legacy application which uses jersey-client-2.7 for http requests, since jersey-client-2.7 does not support HTTP PATCH method,we are using cxf-rt-rs-client-3.3.1. And…
2
votes
0 answers

Jersey MessageBodyReader not found

I'm using jersey-client:2.28, jersey-hk2:2.28 and jersey-media-jaxb:2.28 maven targets to create a client that will consume a RESTful service. All beans have XmlRootElement annotations and default empty constructors. Yet when calling the service…
Alex Colomb
  • 170
  • 8
2
votes
0 answers

Jersey filter starting exception while using forEach

Method definition: @POST @Path("/run") @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) public String runSomething(CustomInputModel customInputModel) { // With simple loop for (String machine :…
2
votes
0 answers

Empty response with jersey 2 client

I'm using Jersey 2.16 client for fetching files, some of the files are coming out empty when I try to parse the response. For example, while trying to fetch URL:…
2
votes
3 answers

Weblogic 12.2.1.0.0 disable default base URI pattern value (resources)

Pre-requsitions: WebLogic Server Version: 12.2.1.0.0 Common Java web-application deployed Started using Jersey client library Issue: Right after that /resources/ URI has been mapped/handled by (embedded) WebLogic JAX-RS/Jersey servlet handler. WL…
Taraskin
  • 561
  • 9
  • 15
2
votes
1 answer

Java client SSL renegotiate

I've got a Dropwizard application where a resource needs to invoke a resource on another Dropwizard application. We noticed that a lot of time is spent on SSL renegotiation. Upon closer inspection this happens only if the other application is on the…
Friso
  • 1,080
  • 6
  • 37
2
votes
1 answer

Spring boot integration testing Jersey JAX-RS resource

I am using Spring Boot 2.0.3.RELEASE and creating a simple Jersey JAX-RS resource (using the jersey spring boot starter). I would like to do a simple integration test using a Jersey Client class I have written, it doesn't seem however that the…
PDStat
  • 5,513
  • 10
  • 51
  • 86