In this tutorial we will create a Java application which will consume REST Web Service.
The web service which will be consumed is developed in this post.
If you have created the Web Service that means you already download Jersey API.
We will need those API for our application.
Create a new java project. Name it "NoteJava"
Insert those Jersey API libraries in our build path.
Create a new java class. Name it "NoteJava.java"
Run the application.
Console will print xml data which you can use and parse for your application.
Its very simple!
Showing posts with label rest. Show all posts
Showing posts with label rest. Show all posts
Thursday, January 13, 2011
Consuming REST Web Service using Android
In this tutorial, we will find out how to create an Android application to consume REST Web Service.
We will create android application which will consume web service in this post .
Our application should look like this.
Create a new Android Application named "Note Android".
Modify AndroidManifest and add INTERNET permission.
Next, create the view for posting new note : main.xml
And the view for viewing all of our notes. There is no component here. Only a layout because we will create the component programmatically
Next, create our view for posting note : DatabaseAndroid.java
And the code for parsing xml retrieved from web service and present each element on a TextView : ViewDatabase.java
Run our application and try creating new notes.
Have fun!
We will create android application which will consume web service in this post .
Our application should look like this.
Create a new Android Application named "Note Android".
Modify AndroidManifest and add INTERNET permission.
Next, create the view for posting new note : main.xml
And the view for viewing all of our notes. There is no component here. Only a layout because we will create the component programmatically
Next, create our view for posting note : DatabaseAndroid.java
And the code for parsing xml retrieved from web service and present each element on a TextView : ViewDatabase.java
Run our application and try creating new notes.
Have fun!
Subscribe to:
Posts (Atom)

