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

807 questions
0
votes
1 answer

Getting java.net.ConnectException : Connection refused

I looked for solutions on SO for this but none of them seem to apply to my case. So here goes: I have an application that needs to make a service call to a third party domain. I am using jersey client to make this service call. The code for making…
kau
  • 362
  • 3
  • 13
0
votes
1 answer

Jersey client in applet doesn't parse JSON

I have a simple application which can be used either as applet and standalone app. It sends a request to REST service and tries to display the result which is a List. City class code is as…
panvik
  • 11
  • 4
0
votes
1 answer

Jersey + Embedded Tomcat Minimal Maven Configuration

Could anyone provide simple configuration of Jersey and Embedded Tomcat in: 1) pom.xml 2) main method I was trying to find it in google search, but they propose to use grizzly, glassfish and etc. Thanks a lot.
Mokko Field
  • 43
  • 1
  • 2
  • 11
0
votes
1 answer

Deserialize List with Jackson in JUnit (Jersey Client)

I recently moved from Jersey 1.X to Jersey 2.1 and using jersey-media-json-jackson for (de-)serializing to Json. In my JUnit-Test I would like to consume a web service that return a List. With Jerey 1.x I used to work with GenericType. However,…
Johannes Staehlin
  • 3,550
  • 7
  • 32
  • 50
0
votes
1 answer

How to mock builder.type().post() method in Jersey REST service

I need to mock builder.type(...).post(...) inorder to write test case for rest client. But I'am getting null pointer exception when mocking it. method to be mocked: ClientResponse response =…
rohan lukose
  • 101
  • 1
  • 13
0
votes
1 answer

Jersey WS issue with Jetty/Tomcat: SEVERE Warnings

I'm a little stuck on an issue we're having deploying a web service. I have tried seemingly everything (although obviously that's not true). These are my jersey dependencies: com.sun.jersey
Eamonn
  • 537
  • 5
  • 22
0
votes
1 answer

Getting Error using Jersey client

I am using a jersey client to push data to the localhost. Here is my code - public CloudConnection(JSONObject jsonPush) throws ClientProtocolException, IOException, JSONException { ClientConfig config = new DefaultClientConfig(); Client…
Dan
  • 701
  • 2
  • 11
  • 29
0
votes
1 answer

How to read data in response of POST operation using jersey client (RestFull)

In my java client application, I am accessing a endpoint URL and could able to get response back, but it is in HTML code!. Method : Post resource.accept(MediaType.APPLICATION_JSON_TYPE); WebResource resource = Client.create().resource( …
Kodaganti
  • 199
  • 1
  • 6
  • 18
0
votes
1 answer

Passing a Database query as an argument from jersey client to jersey webservice to perfom DML

I have a jersey client which needs to perform DML operation on a remote database server. I have created jersey web service which takes argument as a string(i.e. query to be passed by client). I don't know how should I do it. Please help me. Thanks…
Samir
  • 55
  • 6
0
votes
1 answer

How to leverage object transformation in Jersey?

I have annotated my POJOs in Jersey and I have test methods like this one: @POST @Path("/test/pojo/transformation") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) public MyPojo…
pulkitsinghal
  • 3,273
  • 8
  • 40
  • 72
0
votes
1 answer

What is client.setConnectTimeOut & client.setReadTimeOut?

Can someone please explain why one uses this client.setReadTimeOut and client.setConnectTimeOut timeouts? I am using the same with my Jersey client. I have set a timeout of 5 secs for both connect and read. And for testing purpose I have put a…
Sandiip Boa
  • 1
  • 1
  • 3
0
votes
0 answers

Using Twitter search API

I am trying to build a Jersey Rest Client to use the Twitter search api. The code is as folows: package twitter.client.example; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import…
0
votes
1 answer

Neo4j server seems to drop connection when processing for 200 seconds

I've been writing a Neo4j server extension (as described here, i.e. a managed server extension: http://docs.neo4j.org/chunked/stable/server-plugins.html). It should just get a string via POST (which in productivity would hold information the…
khituras
  • 993
  • 8
  • 21
0
votes
1 answer

Can Java EE Application Make HTTP Calls?

Can a Java EE Application -- a Servlet or a Session Bean -- make HTTP calls and still conform to portability standards? (assuming that the caller gracefully handles communication failure or unavailability of network) Furthermore, can a Java EE 7…
necromancer
  • 21,492
  • 19
  • 65
  • 111
0
votes
2 answers

How to parse HTTP 400 response using Jersey Client into a Java Class?

I am using Jersey client to interact with the Facebook Graph API. The Jersey client helps me parse JSON responses into Java classes. Sometimes Facebook sends a 400 response along with useful information about the reason for the 400 response. For…
necromancer
  • 21,492
  • 19
  • 65
  • 111
1 2 3
53
54