axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith <>
Subject RE: REST Services
Date Sun, 20 Apr 2008 13:23:47 GMT
Hi all,

I have attached a sample POJO service hearwith that demonstrates the
REST capabilities of Axis2. (This is a sample that I used at an Axis2
training recently).

It has 3 simple methods
public void registerStudent(String name, int age, String[] subjects)
public Student getStudent(String name) throws StudentNotFoundException
public Student[] getStudents()

all these methods can be accessed via get and POST by default.

here are the URLs for GET (assuming the server is running on port 7762)


Note that i have added data also using a GET which is not a good
practice. I was just trying to show how multiple params can be sent on
the URL. If you need more control of the URLs thats also possible in
Axis2. But you will have to use WSDL 2.0 based deployment. With WSDL 2 I
could have exposed the getStudent operation at a URL such as

Note that in this case keith is a parameter and it was sent on the URL.
I will be writing an article on this soon and it will be available at Will send a note to the list when its published.

Please let me know if you need more help. Hope that this sample explains
to you how you can write and invoke REST services  easily in Axis2.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message