Dear Keith, Thanks for your efforts, but no attachments !
Kind Regards, -- Motaz K. Saad http://motaz.saad.googlepages.com On Sun, Apr 20, 2008 at 3:23 PM, Keith <[EMAIL PROTECTED]> wrote: > 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) > > http://localhost:7762/services/StudentService/getStudents > > http://localhost:7762/services/StudentService/registerStudent?age=26&name=keith&subjects=math > http://localhost:7762/services/StudentService/getStudent?name=keith > > 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 > http://localhost:7762/services/StudentService/student/keith > > 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 > wso2.org. 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. > > Thanks, > Keith. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
