When you need to expose a web service from your own war or if you run into class loader issues in your Application server, you can try this experimental option in Axis2 (1.2 and above).
- Copy all the jars from axis2.war or from the binary distribution into your WEB-INF/lib
- Copy your wsdl and xsd's into WEB-INF/
- Copy the services.xml for your service into your WEB-INF/
- Ensure the service class mentioned in services.xml is in your WEB-INF/classes or in a jar in WEB-INF/lib
- Add the following snippet to your web.xml
<web-app>
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>
org.apache.axis2.transport.http.AxisServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>
- If you don't need modifications to axis2.xml, don't add it into the war. If you need it then add axis2.xml under WEB-INF/conf
That's it folks...If you run into issues, please join axis-user/dev mailing list and ask there.