问题描述
我的步骤:根据网上的帖子一步一步的实现如下:1、下载axis2-1.6.2-war2、在我的struts项目中的web.xml中增加<servlet><servlet-name>AxisServlet</servlet-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>/servlet/AxisServlet</url-pattern></servlet-mapping><servlet-mapping><servlet-name>AxisServlet</servlet-name><url-pattern>*.jws</url-pattern></servlet-mapping><servlet-mapping><servlet-name>AxisServlet</servlet-name><url-pattern>/services/*</url-pattern></servlet-mapping>3、拷贝axis2-1.6.2-war解压缩文件中的lib到我的lib,modules到我的WEB-INF下4、在我的WEB-INF下增加conf文件夹,将axis2-1.6.2-war解压缩文件中的axis2.xml拷贝进来5、在我的WEB-INF下增加service.xml<?xmlversion="1.0"encoding="UTF-8"?><servicename="AxisService"targetNamespace="http://www.wujianjun.org"><Description>测试spring与axis集成(web工程)</Description><parametername="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter><parametername="SpringBeanName">com.test.HelloWorld</parameter><operationname="showName"><messageReceiverclass="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/></operation><operationname="getName"><messageReceiverclass="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/></operation></service>6、修改struts.xml,让容器不拦截services/AxisService启动tomcat成功,然后在IE中尝试访问http://localhost:8080/test/services/AxisService或者http://localhost:8080/test/services/AxisService?wsdltomcat报错:07:03:39,232|ERROR|[AxisEngine]Theservicecannotbefoundfortheendpointreference(EPR)/test/services/AxisServiceorg.apache.axis2.AxisFault:Theservicecannotbefoundfortheendpointreference(EPR)/test/services/AxisService请高手帮忙。关于该类问题,网上一搜一大堆,但是未找到解决的方式
解决方案
解决方案二:
错误原因貌似是engine部署失败,导致AxisService服务部署失败。
解决方案三:
问题已经远程帮你解决啦,给分哟。问题的根源是service.xml配置的不对
解决方案四:
引用2楼hzw19810701的回复:
问题已经远程帮你解决啦,给分哟。问题的根源是service.xml配置的不对