我的Web应用程序中嵌入的Axis2无法正常工作 [英] Axis2 embedded in my web app is not working
本文介绍了我的Web应用程序中嵌入的Axis2无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好吧,我几乎整天都在这方面迷路了. 我有一个webapp,我想在其中添加AXIS2并开始工作. 我在web.xml文件中添加了AxisServlet,例如-
OKay I lost alsmost the whole day on this. I have a webapp where I would like to add AXIS2 and start working. I added AxisServlets in the web.xml file like -
<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>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
我还添加了
<service name="ReportViewerService">
<description>
This is a sample Web Service for illustrating Attachments API of Axis2
</description>
<parameter name="ServiceClass">myclass</parameter>
<operation name="getReport">
<actionMapping>urn:getReport</actionMapping>
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
目录结构如所述此处
WEB-ING
| - conf
| |- axis2.xml
|-lib
| |- all libs
|-services
|-ReportViewerService
| - META-INF
|-services.xml
|- web.xml
The problem is - after all of these, the service endpoint will not come, I can not see the WSDL file http://localhost:8080/BOReportingServer/services/ReportViewerService?wsdl -- this gives an exception like -
Throwable occurred: javax.servlet.ServletException: File "/axis2-web/listSingleService.jsp" not found
推荐答案
最后,我能够将AXIS2嵌入到我的Web应用程序中.
Finally I am able to embed AXIS2 in my webapp.
就像教程中提到的那样简单,唯一的事情是:
It is as simple as mentioned in the tutorial , only thing is:
- 我从没把罐子正确放在 WEB-INF/lib 目录下. 一旦我从头开始,并从WEB-INF/lib目录中删除了所有不需要的jar和重复的jar,就可以开始工作了.
- 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.
这篇关于我的Web应用程序中嵌入的Axis2无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文