Wednesday, December 30, 2009

How to disable service listing in Axis2

Number of users have requested to have a way to enable/disable service listing in Axis2. What that means is, by default Axis2 list out all the service in the system when you go the following URL;


However there are situation where we do not need to expose our services publicly, in such a situation following would comes handy.

To enable/disable service listing use following parameter in axis2.xml (WEB-INF/con/axis2.xml).

<parameter name="disableServiceList">true</parameter>

True – Disable
False -Enable

Adding this does not prevent listing service under administration window, to stop it, you need to change the default username and password. You can do that by changing the following two paramters.

<parameter name="userName">admin</parameter>
<parameter name="password">axis2</parameter>

You can download the fix here, replace axis2-kernel.jar (WEB-INF/lib) with this.

No comments: