Published on WSO2 Oxygen Tank (http://wso2.org)

What Are the Global Parameters Available to Control REST Handling in AxisServlet?

By chinthaka
Created 2006-09-05 10:14

Once you deploy Apache Axis2 Web application in a servlet container, all your services, by default, will get two endpoints to interact with the external world. One for SOAP interactions and the other for REST interactions. Sometimes you might want to customize this default behaviour to suit your specific requirements.

For example, you might want to completely disable REST support, or might want to enable both REST and SOAP to be handled in a single endpoint.

Let's see how this can be done using the following newly introduced parameters to Axis2 configuration file ($CONTEXT_ROOT/axis2/WEB-INF/conf/axis2.xml. CONTEXT_ROOT will be $TOMCAT_HOME/webapps in Apache Tomcat. If you are using a different servlet container, please refer its documentation to find out the context root of it).

As mentioned above, tweaking the above three parameters helps you to control the REST handling capabilities of your Axis2 engine. For example, if you want to have one and only endpoint to handle all the messages, then you can set the parameters as follows in the axis2.xml

<parameter name="enableRESTInAxis2MainServlet" locked="true">true</parameter>

<parameter name="disableSeparateEndpointForREST" locked="true">true</parameter>

Applies To:

Apache Axis2/Java nightly builds and post 1.0 versions


Source URL:
http://wso2.org/library/254