[ERROR] The service cannot be found for the endpoint reference (EPR) /axis2...
公司下一个项目用到了webService+axis2,所以在空闲之余开始了自学。以下是一个地址栏填写有误的error,在此记录下来,希望能帮到其他的人。
访问地址
http://localhost:8088/axis2/services/listServices/getPrice
控制台
[ERROR] The service cannot be found for the endpoint reference (EPR) /axis2/services/listServices/getPrice
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /axis2/services/listServices/getPrice
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:65)
at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:135)
at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:838)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:262)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
问题解决
http://localhost:8088/axis2/services/SimpleService/getPrice
讲解
http://localhost:8088/axis2/services/listServices/ 用于测试类是否发布成功
http://localhost:8088/axis2/services/SimpleService/getPrice 调用服务器方法