How-To's > How do I connect to a web service or RSS feed?


You can access both RESTful and SOAP-based web services. Of the two, RESTful web services are easier to access. See the following examples for accessing both types of web services, as well as RSS feeds.

RESTful web services provide data in two formats: XML and JSON, both of which are supported by JavaFX technology. Perform the following basic steps to access a RESTful web service:

  • Create a custom class with variables that match the data that will be obtained from the web service
  • Use HttpRequest to connect to the web service.
  • Use PullParser to parse the XML or JSON data.

Accessing RSS feeds works in a similar fashion: Access the data by using HttpRequest and parse the XML data with PullParser.

Examples of Accessing RESTful Web Services

Examples of Accessing RSS Feeds

Examples of Accessing SOAP Web Services

API Documentation

Last Updated: April 2010
[Return to How-To's Home]