While it is not recommended to use this application to dynamically modify a production environment the Axis2 admin application can be useful for validating settings, viewing services, modules, etc. To build your EAR file to include this application:
- Download the Axis2 binary distribution (http://axis.apache.org/axis2/java/core/download.cgi) corresponding to the supported Apache Axis2 version (1.5.1) and unload it to your hard disk (e.g. C:\Downloads\Axis2).
- Create a location on your disk to contain the necessary Axis2 artifacts; e.g.:
cd C:\
mkdir Axis2-includes
- Put the class files, AdminAgent.class & AxisAdminServlet.class, in the C:\Downloads\Axis2\webapp\WEB-INF\classes\org\apache\axis2\webapp\ (based on the sample location above) directory from your Axis2 binary download location into a jar file that you will place into the WEB-INF\lib directory in your newly created C:\Axis2-includes location (as above); e.g.:
mkdir C:\Axis2-includes\WEB-INF\lib
cd C:\Downloads\Axis2\webapp\WEB-INF\classes
jar -uvf C:\Axis2-includes\WEB-INF\lib\WebAdmin.jar
org/apache/axis2/webapp/
- Additionally, you may want to add a custom axis2.xml descriptor file to a WEB-INF\conf folder to change the default credentials. You can copy the existing shipped axis2.xml file to this location; e.g.:
mkdir C:\Axis2-includes\WEB-INF\conf
copy %CURAMSDEJ%\ear\webservices2\Axis2\conf\axis2.xml
C:\Axis2-includes\WEB-INF\conf
- And then change the existing userName and password parameters, for example:
<parameter name="userName">restricted</parameter>
<parameter name="password">special</parameter>
- Of course, for this to be secure the axis2.xml file would have to be secured in your development and deployed environments without access in the runtime environment to the Axis2 configuration.
- Then, use the following properties when you invoke your web services ear target (see Building and Packaging Web Services):
-Daxis2.include.overwrite=true
-Daxis2.include.location=C:\Axis2-includes
- Upon deployment you should then be able to access the Administration link via the Axis2 "Welcome!" page menu (e.g. http://localhost:9082/CuramWS2/axis2-web/index.jsp).