Affichage des articles dont le libellé est json. Afficher tous les articles
Affichage des articles dont le libellé est json. Afficher tous les articles

mercredi 23 mai 2012

RESTful client in Java with JAX-RS 2.0 Client API (JSON update)


When I wrote RESTful client in Java with JAX-RS 2.0 Client API, I thought that JSON serialization/deserialization was not working with Jersey 2.0-m3.
But, in fact, it works as designed and Martin Matula gives us the solution in his second comment and in JIRA).
To use the JSON serialization/deserialization (with Jersey 2.0m3), you have to:
  •  enable the JsonFeature on the client with the line:
    client.configuration().enable(new JsonFeature());
  •  and add the jars:
    jersey-media-json-2.0, jackson-jaxrs, jackson-core-asl, jackson-mapper-asl and jackson-xc

jeudi 11 novembre 2010

RESTful client in JavaScript

In the line of my posts regarding consumption of JSON RESTful services in different technologies (JavaFX, Java), I wrote a small client in JavaScript.
As in my previous posts, I use the RESTful service described in RESTful service with JAX-RS (and JPA 2 for the access to the data.

dimanche 10 octobre 2010

RESTful client in Java

Because JavaFX 2.0 will be a Java API, we shall have to use Java (or Groovy, Scala, JRuby,etc ... but this isn't the purpose  of this post) instead of JavaFX Script for use it.
And because, the news UIs creates with JavaFX 2.0 will have to consume RESTtful JSON services, I wrote a small RESTful client in Java.
To do that, I use the JAXB's implementation for JSON from
Jersey and for the RESTful service to be consume, the RESTful service wrote in an old post: RESTful service with JAX-RS (and JPA 2 for the access to the data)

dimanche 1 août 2010

RESTful client in JavaFX

In this second part, we are going to create a small application in JavaFX to call the restful service created in the first part.
This small application is the same as the one created in an older post : JavaFX and JPA 2.0 with my custom component, but instead of call directly the database with the help of an entity, we are going to call the restful service.

To create this application, we are going to create :
·         a Music JavaFX Bean as model
·         a client to the RESTFul services (and its JSON parser)
·         an JavaFX User Interface