Axis2 embedded in my web app is not working

寵の児 提交于 2019-12-07 07:57:25
Shamik

Finally I am able to embed AXIS2 in my webapp.

It is as simple as mentioned in the tutorial , only thing is:

  • I never got the jars properly placed under WEB-INF/lib directory. Once I started from the very beginning and removed all the unwanted jars and duplicate jars from the WEB-INF/lib directory, so started working.

I had this same symptom when trying to deploy an axis2 service with a packed (unexploded) .war file on a tomcat server.

"Throwable occurred: javax.servlet.ServletException: File "/axis2-web/listSingleService.jsp" not found"  

The solution was to add the 'services.list' file to the /WEB-INF/services/ folder. (There is also a modules.list file for the /WEB-INF/modules/ folder.)

These are just a text files listing out the service archive files in the folder.

/WEB-INF
 |-modules
   |-addressing-1.6.1.mar
   |-...
   |-modules.list
   |-...
   |-soapmonitor-1.6.1.mar
 |-services
   |-ReportViewerService.aar
   |-services.list

In the .list files, contain just the names of the archive files, one entry per line.

Reference: http://axis.apache.org/axis2/java/core/docs/app_server.html

You also deployed axis2.war in your servlet container, right?

In order for Axis2 to work properly, you need to deploy it to a servlet container. A tutorial can be found here. You'll know you've done it properly when the Axis2 "Happy" page can be shown.

Once you've done that, you should be able to bundle up your service (in the structure you've described above in your question) into an .aar file and deploy it using the axis2 servlet.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!