报错内容如下所示:
HTTP Status 500 - File "/axis2-web/listSingleService.jsp" not found
type Exception report
message File "/axis2-web/listSingleService.jsp" not found
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: File "/axis2-web/listSingleService.jsp" not found org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgent.java:119) org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:200) org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.37 logs.
一开始总以为是找不到axis2-web文件之类的错误,但是经过仔细排查是发布的路径出错。
正确路径为:http://servername:port/projectname/services/interfaceMethod?wsdl
PS:
servername: 本地为:127.0.0.1 或公网IP
port: Tomcat默认为:8080 或因修改而异,如果为80可忽略不写
services: 为META-INT下新建services.xml,的名字
interfaceMethod:接口方法,根据services.xml中发布的方法正确填写即可。
欢迎拍砖。