Tuesday, March 29, 2011

SOAP , REST - Web Services - on Linux with Axis2

Working with Axis2: Making a Java Class into a Service

Exposing a Database as a Web Service

Understanding Axis2 Deployment Architecture


Inserting a New Person Object

Inserting a person object also can be done using a REST call. You need to pass the id, name, address, and the age to add a new person into the table. You can pass them as URL query parameters, as you can see below.
http://localhost:8080/axis2/services/DBSampleService/insertPerson?
id=130&name=Peter&address=No 5, Colombo, Sri Lanka&age=56
This will call the service and insert a new raw to the database. If you want to make sure that the new data in the database just lists all the people again, you can see the new person also in the DB.

 

No comments:

Post a Comment