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

RESTful: What is the difference between ClientProperties.CONNECT_TIMEOUT and ClientProperties.READ_TIMEOUT in Jersey?

For setting up the timeouts while making REST calls we should specify both these parameters but I'm not sure why both and exactly what different purpose they serve. Also, what if we set only one of them or both with different value?
4
votes
0 answers

Pretty print XML using Jersey client

How can I pretty print the XML response from Jersey Client? Right now I am using a logging filter on Jersey Client with XML_FORMAT_OUTPUT set to true, but this pretty prints only the request message, not the response... Does the response need to be…
4
votes
1 answer

Jersey client can't specify media type

I have a get call to a rest service (that works fine), and I would like to change it and use jersey. I downloaded the last JARs from the official site and put them inside my project. All my response thrown exceptions (except this: String response =…
Accollativo
  • 1,537
  • 4
  • 32
  • 56
4
votes
1 answer

Web Application Exception: javax.ws.rs.NotSupportedException: HTTP 415 Unsupported Media Type

I'm using jersey and spring in my application. I don't have any issue when working with any AJAX requests but i get media not supported error when uploading files. I tried several ways, but haven't find any fix for it. Wondering if anyone can help…
user1595858
  • 3,700
  • 15
  • 66
  • 109
4
votes
1 answer

Jersey async request handling with programmatical resource registration

We used org.glassfish.jersey.server.model.ResourceMethod$Builder to register the method and the handler. ResourceMethod.Builder methodBuilder =…
4
votes
1 answer

How to use Genson provider as default in Jersey client?

I have simple client based on Jersey framework. I want to use Genson as default JSON provider. Firstly I created some class which implemented ContextResolver: @Provider public class GensonCustomResolver implements ContextResolver { …
Alexiuscrow
  • 776
  • 2
  • 15
  • 34
4
votes
2 answers

Java Jersey HTTPS GET request with Authentication header

I'm trying to integrate a payment service 'Mollie' (http://www.mollie.nl) which works over HTTPS requests into a Java environment. As for this posts i'll be using following request to explain: Within PHP (since I have a PHP background) I can work…
daan.desmedt
  • 3,752
  • 1
  • 19
  • 33
4
votes
1 answer

How to post raw data using JAX-RS 2.0 client API

I have a raw inputStream and a HttpServletRequest i need to send the whole inputStream recieved as well as the headers to another servlet(as it is) using JAX-RS client. Client client = ClientBuilder.newClient(); WebTarget reTarget =…
Manas Pratim Chamuah
  • 1,527
  • 2
  • 15
  • 33
4
votes
2 answers

Options for custom serializers / deserializers with Dropwizard?

What's a good way to have custom (de)serializers that can be registered externally with dropwizard? I was having problems with (de)serializing a composite object. I tried using @JsonUnwrapped to get the JSON I wanted, but had problems with it for…
neuronotic
  • 487
  • 7
  • 18
4
votes
3 answers

Jersey 2 client with maven

I want to create simple Jersey 2 Client app with Maven (Server app is also implemented and runs). My pom.xml
jiri463
  • 859
  • 1
  • 8
  • 21
4
votes
1 answer

Jersey client API vs Jersey test framework

I am new to web services and would like to know what is the difference between Jersey client API and jersey test framework? I would like to test my jersey REST web-services end points. Which is the the right one to use?
user1247412
  • 647
  • 7
  • 16
  • 29
4
votes
1 answer

Jersey Client supported with Android?

I want to use REST Jersey Client to invoke web services. But it is failing when invoked from android app; the same web service call works when invoked from simple java client (without any Android code). Does it mean Jersey Client doesn't work when…
CoolDude
  • 417
  • 1
  • 5
  • 11
4
votes
0 answers

Duplicate Web Service call using Jersey client

We have been facing issue with the Jersey client (ver 1.8) ends up making duplicate service call even though the system is requesting for just one. System makes a web service call through Jersey client Web Service provider ends up getting two…
raks
  • 51
  • 2
4
votes
1 answer

NewCookie.getMaxAge() always returns -1

I have two servers. S1 and S2. S2 is a REST API based server. S1 is an HttpServlet. I get a request to S1from client browser. I retrieve the request URI and Request method and based on certain conditions make call to a particular REST API on S2. For…
User3518958
  • 676
  • 1
  • 6
  • 19
4
votes
2 answers

Jersey client with ignore ssl with proxy setting

how to configure the proxy to Jersey client. I am using the code from this site https://gist.github.com/outbounder/1069465. since in my coding environment, i have to use the proxy server over the https client.
ramesh027
  • 796
  • 1
  • 10
  • 27