Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Invoke RESTful Web Services from JavaFX

Learn how to access RESTful web services from a JavaFX application.


advertisement
avaFX, a new Sun Microsystems product family (including a scripting language, JavaFX Script), is optimized for implementing rich Internet applications for desktop and mobile devices. It comes bundled with the latest editions of the Java SE Runtime Environment (JRE) and Development Kit (JDK), and it provides its own API.

Although JavaFX Script uses syntax that somewhat resembles Java and JavaScript, it is important to understand how JavaFX differs from Java. One area in particular where this understanding would be helpful for Java developers who are just beginning to explore JavaFX is RESTful web services invocation. This 10-Minute Solution demonstrates how to invoke RESTful web services from JavaFX, and how to process the results.

As an example, it shows how to call a RESTful web service that provides information about airport departures and arrivals to a JavaFX front end. For the service URL, here is the abridged service data:



<schedule> <flight> <number>101</number> <time>11:08:45</time> <direction>Departure</direction> <carrier>USFlair</carrier> <destination>TYS</destination> <origin>ATL</origin> </flight> </schedule>


How do I call a RESTful web service from a JavaFX application, and how do I process a result?


Invoke a GET RESTful web service method and parse its results into a JavaFX object.

What You Need
JDK 6 Update 11
NetBeans 6.5 for JavaFX 1.0
For Eclipse users: JavaFX Plugin for Eclipse*
Developer References
"Getting Started With JavaFX Technology"
"JavaFX 1.0 API | Overview | Java FX"
* At this point, because of the newness of the product, NetBeans 6.5
provides the best support for JavaFX development.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap