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
0 answers

Mule maven dependency errors - REST calls using com.sun.jersey

I'm running 2 mule flows with custom built connectors using jersey-client for REST calls: com.sun.jersey jersey-client 1.19.1
André
  • 21
  • 1
2
votes
1 answer

Jersey Client : Using ConnectionKeepAliveStrategy

Need help in applying ConnectionKeepAliveStrategy for ApacheConnector in jersey client. For a standalone Apache Client, we can do it this way - ConnectionKeepAliveStrategy myStrategy = new ConnectionKeepAliveStrategy() { public long…
Nikhil
  • 191
  • 1
  • 6
2
votes
1 answer

How to raise customized exception in Jersey Client?

I'm learning Jersey and JAX-RS 2.x via my project "shop". I want my client SDK to raise a ShopException whenever the HTTP response is 4xx or 5xx. Here's what I've tried—registering a ClientResponseFilter in the client builder: target = …
Mincong Huang
  • 5,284
  • 8
  • 39
  • 62
2
votes
1 answer

A message body writer for Java type was not found mime type application/x-www-form-urlencoded

I know this question has been asked before but none of the answers suits my case. So i have to ask for help. I am new to JERSEY and I'm supposed to make a rest client that connects to a service and gets a token from it. The code is the following: …
softwareplay
  • 1,379
  • 4
  • 28
  • 64
2
votes
3 answers

Jersey 2 - with .target HTTPS

I've been trying to perform a POST from a jersey client but continue to run into the following exception: Caused by: java.lang.IllegalStateException: Already connected at…
Esteban Rincon
  • 2,040
  • 3
  • 27
  • 44
2
votes
1 answer

Refresh OAuth token with jersey 2 client

I'm currently migrating an application from jersey 1 to 2. In the old app, we used a ClientFilter for all jersey clients that automatically refreshed expired OAuth tokens like this: @Override public ClientResponse handle(ClientRequest cr) { …
Jan Gassen
  • 3,406
  • 2
  • 26
  • 44
2
votes
0 answers

Play framework SBT managed dependency error while creating the build

I am trying to include the dependencies for creating a jersey client in a play framework (2.2.4 - java) application. I am using JDK 1.7 to run the application. The application works fine when I run the code (using play run) or create a build (using…
greenPadawan
  • 1,511
  • 3
  • 17
  • 30
2
votes
1 answer

JAX-RS/Jersey 2 file download - Is there a common API for server and generated client proxy

I autogenerate the JAX-RS interfaces from Swagger. I use Jersey 2.25.1. All works fine for most of the use cases. We have the same interface for the server and client parts. Clients are generated from the interface with…
rcomblen
  • 4,579
  • 1
  • 27
  • 32
2
votes
1 answer

How to get Optional class with jersey client

I'm trying getting the optional class with jersey client. When the remote server returns Optional.empty(), I'm getting this error. Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "present" (class…
Rhododendron
  • 559
  • 2
  • 7
  • 15
2
votes
1 answer

Base64 encoding exception with BASIC authentication of Jersey client

I have a Jersey client running on Wildfly 9 with BASIC authentication enabled. This works well in general, but when using passwords with special characters (such as German umlauts) I get this exception, related to Base64 encoding: Caused by:…
j-dimension
  • 119
  • 10
2
votes
2 answers

How to do HTTP POST request with queryParam using Jersey 2.26 client?

I am using Jersey client to do requests. Here is an example.…
Z Li
  • 53
  • 1
  • 9
2
votes
1 answer

Jersey Client Posting Form Data

I'm learning about JAX-RS and Jersey. I am trying to post data to a URL however I have an issue I do not know to fix: Form formData = new Form(); formData.param("merchant_id", mPayment.getMerchantId()); formData.param("transaction_id",…
user3718908x100
  • 7,939
  • 15
  • 64
  • 123
2
votes
0 answers

Error starting with java and jersey 2

I'm trying to create a Rest application with Jersey using Maven but I always end up having the same errors. I downloaded the default zip on the Jersey website and set up my jars in the project, but every time I start the application the following…
Bruno César
  • 81
  • 1
  • 13
2
votes
1 answer

Multiple-thread access by Jersey client 2.25.1 with HTTPS(Certificate)

I meet a problem while using "javax.ws.rs.client.Client(Jersey client 2.25.1)" to send https request in multiple-thread context. 1) First I create a client like following: Client client =…
Bluez
  • 21
  • 1
2
votes
1 answer

Java Jersey POST Request with CSRF Protection

I have a spring boot REST Service which offers some methods. They are protected by CSRF and Username / Password Basic Auth (https). But when I try to do a POST Request it fails with Status Code 403 and Message "Could not verify the provided CSRF…
Daniel Pomrehn
  • 791
  • 3
  • 8
  • 23