Solved

AXIS and Tomcat

Posted on 2004-10-29
9,430 Views
Last Modified: 2012-08-13
Hello my friends,

i'm a axis/tomcat newbie in windows,
and, as you already guessed, nothing works.

i got axis and tomcat as far as happy axis is
completely happy.
i got the admin stuff in web.xml of axis enabled.
however, none of the axis servlets is working.
i'm going with tomcat 5.5.3 and java 1.4.2_05
compatibility plus axis 1.2 alpha.


http://localhost:8080/axis/services/Version?method=getVersion
produces

"HTTP Status 404 - /axis/services/Version

--------------------------------------------------------------------------------

type Status report

message /axis/services/Version

description The requested resource (/axis/services/Version) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.3"

also, when i use my eclise 3.0 to try the example
http://pyre.third-bit.com/bindsoap/soapexamples/soapexamples.html,
when i come to
...Double-click on the class in the package explorer. This should bring up a different window called the "Class File Editor" - but this isn't important. From the top menu, go to Run->Run... and ...
it produces the output

"log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
Exception: AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (404)/axis/services/AdminService
 faultActor:
 faultNode:
 faultDetail:
      {}:return code:  404
<html><head><title>Apache Tomcat/5.5.3 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /axis/services/AdminService</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/axis/services/AdminService</u></p><p><b>description</b> <u>The requested resource (/axis/services/AdminService) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.3</h3></body></html>
      {http://xml.apache.org/axis/}HttpErrorCode:404
"

When i browse to my axis directory,
which is "C:\Programme\Internet\Tomcat\webapps\ROOT\axis"
i also cannot find a sub-directory called servlet.

The main axis page comes correct, but when i click to view the list of deployed blabla,
i also the error that the AxisServlet is not to be found.

Could you please help me?
Thanks.
0
Question by:drnick
    10 Comments
     
    LVL 35

    Expert Comment

    by:TimYates
    sounds like you are missing something in web.xml...

    can you double check it and/or post it here?
    0
     
    LVL 5

    Author Comment

    by:drnick
    ok, i put the axis-thing inside my Tomcat\webapps\ROOT folder,
    in the directory axis.
    So i got web.xml inside Tomcat\webapps\ROOT\axis\WEB-INF.
    another web.xml is inside Tomcat\conf.

    i state the content of the first one here, since that one should
    be the interesting one:

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>
      <display-name>Apache-Axis</display-name>

        <listener>
            <listener-class>org.apache.axis.transport.http.AxisHTTPSessionListener</listener-class>
        </listener>

      <servlet>
        <servlet-name>AxisServlet</servlet-name>
        <display-name>Apache-Axis Servlet</display-name>
        <servlet-class>
            org.apache.axis.transport.http.AxisServlet
        </servlet-class>
      </servlet>

      <servlet>
        <servlet-name>AdminServlet</servlet-name>
        <display-name>Axis Admin Servlet</display-name>
        <servlet-class>
            org.apache.axis.transport.http.AdminServlet
        </servlet-class>
        <load-on-startup>100</load-on-startup>
      </servlet>

      <servlet>
        <servlet-name>SOAPMonitorService</servlet-name>
        <display-name>SOAPMonitorService</display-name>
        <servlet-class>
            org.apache.axis.monitor.SOAPMonitorService
        </servlet-class>
        <init-param>
          <param-name>SOAPMonitorPort</param-name>
          <param-value>5001</param-value>
        </init-param>
        <load-on-startup>100</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>

      <servlet-mapping>
        <servlet-name>SOAPMonitorService</servlet-name>
        <url-pattern>/SOAPMonitor</url-pattern>
      </servlet-mapping>


      <servlet-mapping>
        <servlet-name>AdminServlet</servlet-name>
        <url-pattern>/servlet/AdminServlet</url-pattern>
      </servlet-mapping>


        <session-config>
            <!-- Default to 5 minute session timeouts -->
            <session-timeout>5</session-timeout>
        </session-config>

        <!-- currently the W3C havent settled on a media type for WSDL;
        http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
        for now we go with the basic 'it's XML' response -->
      <mime-mapping>
        <extension>wsdl</extension>
         <mime-type>text/xml</mime-type>
      </mime-mapping>


      <mime-mapping>
        <extension>xsd</extension>
        <mime-type>text/xml</mime-type>
      </mime-mapping>

      <welcome-file-list id="WelcomeFileList">
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.jws</welcome-file>
      </welcome-file-list>

    </web-app>
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    >  ok, i put the axis-thing inside my Tomcat\webapps\ROOT folder,
    > in the directory axis.

    This won't work...

    EITHER

    a)  Move the axis directory to the webapps directory,

    OR

    b) Move the WEB-INF contents to ROOT/WEB-INF
    0
     
    LVL 35

    Accepted Solution

    by:
    I would do (a)

    You may then need to add axis as a context inside server.xml

    open server.xml

    look for the bit which defines the context for "examples"

    copy that bit of xml, and paste it in just after the examples bit, and change all references for "examples" to "axis"

    :-)
    0
     
    LVL 5

    Author Comment

    by:drnick
    would be so kind to post such a bit?
    since i made the error of not installing examples included,
    there seems to be no examples-context-entry in server.xml
    and when i got to install the whole thing again,
    i'm gonna get nuts you know -
    i wrote my installation steps down, because a group
    of my fellow students have to use this stuff also,
    and it is now 20 steps,
    meaning installing is not funny anmore :-)
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    Actually...you don't need to change server.xml

    just move the axis directory to

      tomcat/webapps/axis

    and restart tomcat...

    (and cross your fingers) ;-)

    hehehe

    Tim
    0
     
    LVL 5

    Author Comment

    by:drnick
    here you got your points, fellow,
    at least the axis functions work.
    gonna try the examples now,
    so prepare for a new question following soon :-)
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    Hee hee, good luck with it all!!

    And hope your fellow students can follow in your footsteps :-)

    Tim
    0
     
    LVL 5

    Author Comment

    by:drnick
    0
     
    LVL 5

    Author Comment

    by:drnick
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    IT Security CISA, CISSP & CISM Certification

    Master the advanced techniques required to protect network resources from external threats with the IT Cyber Security bundle. Built around industry best-practice guidelines, the IT Cyber Security bundle consists of three in-depth courses.

    The first time you look at a web page and its source code, you are probably a little intimidated by the use of symbols and jargon that really looks foreign to you. You might not even know where to start to begin learning what it all means. That’…
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now