Source code example?

Hi Tim,

Any source code example, e.g. using Jersey?
I tried plain “get” using
client = ClientBuilder.newClient();
webTarget =;
String answer = webTarget.request().get(String.class);

but this failed.
As one needs username and password, do I need a “post”. If so, how do I pass username and password as parameters?

Many thanks in advance,
Jozef Aerts

A short update: Tim pointed me to:

I was a bit puzzled as I do have other client applications that use RESTful web services that run over https with authentication (though over POST) and did run without problems in the past (MedLine-Plus, UMLS-NLM, …). I ran them again at home yesterday night and suddenly they did not run anymore, giving a similar error (handschake problem - these programs still use JAX-RS 1). At work however, where I am currently developing the new LOINC application, they run fine.
So this contributed to further confusion.
So, at the moment it looks like it has to do with whether and how certificates are stored in the JRE, how they did get there (I never explicitely added some manually), and how they are maintained when a JRE update takes place.

When I find a solution, I will surely make it available to the broad public. This LOINC service is so immensely important for the medical informatics world … In the mean time, if someone has created a Java client successfully, I am always glad to hear.


Thank you for the update and thank you for sharing your findings. We are extremely happy you find this service useful.