Integrating axis
ti-axis separates the engine setup and configuration as well as the deployment of services.
ti-axis uses the Spring MVC framework to register and startup the Axis engine. Below is a sample - somewhat minimal - web.xml configuration showing how to add the dispatcher servlet to the standard web configuration:
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>tiAxis test web context</display-name> <servlet> <servlet-name>tiAxis</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>tiAxis</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> </web-app>
Please refer to the Spring MVC documentation for further documentation. With this configuration ti-axis moves the axis engine configuration out of the web.xml into the Spring context xml file. In this simple example the dispatcher servlet will search for the its context configuration in the WEB-INF/ directory, in this case: WEB-INF/tiAxis-servlet.xml
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiAxis="http://antidoto.sf.net/subsystem/ti-axis" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://antidoto.sf.net/subsystem/ti-axis http://antidoto.sf.net/xsd/ti-axis.xsd "> <tiAxis:controllerSetup engineName="main"> <tiAxis:urlMapping pattern="/services/*"/> </tiAxis:controllerSetup> </beans>
The example above shows how to use the ti-axis configuration beans to add a axis engine and configure the url mappings in one single simple step.