Affichage des articles dont le libellé est java. Afficher tous les articles
Affichage des articles dont le libellé est java. 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 10 mai 2012

RESTful client in Java with JAX-RS 2.0 Client API


On october 21th 2010, I wrote a RESTful client in Java. We are now in 2012, and the next version of JAX-RS (the 2.0 and which will be included as part of Java EE 7) will include a client API.

The JAX-RS 2.0 specification is still work in progress, but a few implementations already exist (in beta or in the first milestones).

To begin to explore the JAX-RS Client API, I decided to use the Jerseyimplementation (which is the JAX-RS's reference implementation) and the same RESTful service that I used in RESTful client in JAVA.

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)

samedi 16 février 2008

Mac Os X 10.5, une nouvelle preview(9) de java SE 6 !

Une nouvelle Java SE 6 Developer Preview (9) est disponible sur ADC et elle inclus java SE 6 version 1.6.0_04 pour voir ce qu’il ya de nouveau, la realese note ! Et sinon, vous pouvez aussi allez lire ce que j’écris de temps en temps sur le blog de la boite ou je bosse actuellement :)

mardi 19 juin 2007

JRuby et la plateforme Java

Un article intéressant sur l’interaction entre JRuby et la plateforme Java avec entre autres :
  • comment faire du Swing en Ruby
  • comment exécuter du Script Ruby depuis Java à l’aide de la nouvelle fonctionnalité de scripting de Java SE 6 (jsr 223)
  • l’utilisation de NetBeans avec JRuby
  • etc…

jeudi 7 juin 2007

2 articles intéressants sur Sun Developper Network

Le premier, Using the Persistence API in Desktop Applications, explique comment utiliser JPA dans une application Desktop en utilisant TopLink Essentials comme implémentation JPA Et le second, Java Web Start Technology and Application Clients in the GlassFish Application Server, montre comment faire une application riche en utilisant ACC (Application Client Container) de JEE et Java Web Start avec le serveur d’application GlassFish de Sun.

mercredi 9 mai 2007

JavaFX pour les RIA (Rich Internet Application)

On attendait la réponse de Sun à Silverlight (ex WPF/E) de Microsoft et Flash/Flex/Apollo d’Adobe … Et bien la voila ! A Java One, Sun annonce JavaFX ! Pour plus d’info sur JavaFX c’est par ici Et pour le projet OpenJFX c’est pas la ! J’ai essayé quelques démos… Dans une qui ressemble au XAMLPad de Microsoft, le JavaFXPad … Par rapport au XAML le JavaFX Script parait assez bizarre, mais c’est tout nouveau donc on a pas encore l’habitude … Et surtout, il faudra voir à l’usage !

lundi 7 mai 2007

NetBeans 6.0 M9 (Milestone 9) est arrivé !

Les principales nouveautés (pour la version full)
  • Support de Ruby, JRuby et Ror (Ruby on Rails)
  • Plus de facilités pour développer en Swing avec l’intégration de JSR 295 (Beans Binding) et 296 (Swing Application Framework)
  • Intégration d’un profiler (ex profiler pack)
  • Intégration d’un designer visuel pour les applications Web (ex Visual Web Pack)
  • Intégration d’un outil de développement pour CDLC/MIDP et CDC (ex Mobility Pack) (pas présent pour les utilisateurs Mac :( )
  • Intégration d’un modeleur UML et SOA (ex Entreprise Pack)
  • Etc…

Pour plus d’information Et pour le download !

dimanche 6 mai 2007

Beans Binding (JSR 295) exemple

La version 0.5 de l’implémentation de référence de la JSR 295 a été rendu public début avril Ayant voulu essayer de faire joujou avec, je me suis heurté au manque d’exemple … "An proper introduction and examples on this project page are forthcoming."’ J’ai donc récupéré un ancien exemple de Scott Violet sur son blog que j’ai adapté à cette nouvelle version de la RI de Beans Binding et les sources sont downloadable ici (ou la) et utilisent le jdk 1.6 (utilisation de GroupLayout) Pour utiliser le projet NetBeans, il faut re-référencer les jars qui se trouve dans le répertoire lib du projet et positionner le bon jdk ! La classe à exécuter est BindingCaricatureController (NoBindingCaricatureController et la version sans Beans binding)