Work using axis 2 inside a WAR application

I am trying to add Axis2 parsing / processing to an existing web application. This compiles to a WAR file, however my understanding (hopefully incorrect) of the Axis2 process is that to run it on the Tomcat server you need to install the Axis2.war servlet and then compile the Axis2 application into a .aar file and put it in the $ subdirectory CATALINA_HOME / axis2 / services.

I need this to compile into a war file and fit in the usual place.

From my understanding, to use Axis2 you need a servlet container in order to have a transport listener, which is an Axis2.war servlet. Then it will transfer the corresponding installed .aar file. I read a lot of documentation and don’t see how to make Axis2 more transparent.

Did anyone know about this?

+3
source share
1 answer

You can add axis 2 as a servlet to your current application. All you have to do is add something like this to your web.xml:

<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>

And display:

<servlet-mapping>
   <servlet-name>AxisServlet</servlet-name>
   <url-pattern>/services/*</url-pattern>
</servlet-mapping>

Here is the configuration guide.

+3
source

Source: https://habr.com/ru/post/1780842/


All Articles