Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem deploying Axis2 in Tomcat

Tags:

tomcat

axis2

I am trying to install Axis2 in a servlet container (Tomcat) by using this link. But after succesfully following all the steps and after starting tomcat I am not able to see the index file for Axis2. Instead I am getting following error.

[ERROR] The service cannot be found for the endpoint reference (EPR) /axis2/services/ org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /axis2/services/

I think there is some problem in mappings thats been done in web.xml. Following is the web.xml snapshot.

<web-app>
    <display-name>Apache-Axis2</display-name>
    <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>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>AxisAdminServlet</servlet-name>
        <display-name>Apache-Axis AxisAdmin Servlet (Web Admin)</display-name>
        <servlet-class>
            org.apache.axis2.webapp.AxisAdminServlet</servlet-class>
    </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>

    <servlet-mapping>
        <servlet-name>AxisAdminServlet</servlet-name>
        <url-pattern>/axis2-admin/*</url-pattern>
    </servlet-mapping>
   <extension>inc</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>

   <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>index.html</welcome-file>
      <welcome-file>/axis2-web/index.jsp</welcome-file>
    </welcome-file-list>

    <error-page>
      <error-code>404</error-code>
      <location>/axis2-web/Error/error404.jsp</location>
    </error-page>

    <error-page>
        <error-code>500</error-code>
        <location>/axis2-web/Error/error500.jsp</location>
    </error-page>
</web-app>

Also this is the directory structure when axis2.war is expanded in webapp directory of tomcat.

webapps

  • axis2
    • axis2-web
    • META-INF
    • org
    • WEB-INF
      • classes
      • conf
      • lib
      • modules
      • services
      • web.xml (Not expanding each directory but just the main ones)

Any tips / suggestions would be very helpful.

like image 362
chitresh Avatar asked Feb 21 '11 09:02

chitresh


1 Answers

I deployed i.e copied the axis2.war file inside the tomcat/webapps directory. Hence whenever tomcat use to restart, it use to extract axis2.war into a folder axis2. But somehow it used to get confused as axis2.war was still there and not been deleted. So after extracting the axis2.war into axis2 folder, deleting the axis2.war file resolved all the issues. Now everything is working fine.

like image 109
chitresh Avatar answered Oct 19 '22 04:10

chitresh