REST is providing accses to the resources through the two methods GET and POST. The REST Web services are reduced subset of the usual Web Service stack, and the Axis2 REST implementation assumes following properties.
Axis2 can be configured as REST Cantainer and can be used to send and receive restful web services requests and responses. The REST Web Services can be access in two ways, using HTTP GET and POST.
REST support can be enabled in the Server side by adding the following line to the axis.xml file.
< parameter name="eanbleREST" locked="xsd:false" > true </parameter>But it acts both as a REST endpoint as well as a SOAP endpoint. When a Message is received if the content type is text/xml andif the SOAP Action Headers are missing, then the Message is treated as a RESTful Message. Else they are treated as usual SOAP Messages.
On sending a message out, the fact that the message is RESTful or not, can be decided from the client API or by deployment descriptor of the client.
There's a userguide.clients.RESTClient.java which demonstrates the usage of the above, using the operation of the of the samples. And the class source will be as follows
Axis2 let the users access Web Service that has simple type parameters via the HTTP GET. For example following URL requests the version service Via HTTP GET. But the Web Services arrived via GET assumes REST . Other parameter are converted in to the XML and put them in to the SOAP Body.
Result can be shown in the browser as follows.
For an example request will be converted to the following SOAP Message for processing by Axis2