You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by ro...@elastica.com on 2006/05/09 17:59:36 UTC

Am I forced to use the axis webapp as my deployment?

I'm getting class not found exceptions with the following setup.

axis jars in tomcat's shared lib.

I've got the axis web app and I've also got my web app.

my web app also defines the AxisServlet since it was complaining if I had a
mapping refering to AxisServlet when it was only defined in the axis web.xml

Is this deployment supported or must I deploy everything using axis as my web
application?


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Re: Am I forced to use the axis webapp as my deployment?

Posted by Arnaud Weber <aw...@ebusinessinformation.fr>.
No, you can use the jars of axis inside your own webapp.

you have to import them in your classpath

Here is a maven part which will import them automatically:
              
              <dependency>
                <groupId>axis</groupId>
                <artifactId>axis</artifactId>
                <version>1.4</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>
            <dependency>
                <groupId>axis</groupId>
                <artifactId>axis-ant</artifactId>
                <version>1.4</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>
            <dependency>
                <groupId>axis</groupId>
                <artifactId>axis-schema</artifactId>
                <version>1.3</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>
            <dependency>
                <groupId>axis</groupId>
                <artifactId>axis-jaxrpc</artifactId>
                <version>1.4</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>
            <dependency>
                <groupId>axis</groupId>
                <artifactId>axis-saaj</artifactId>
                <version>1.4</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>
            <dependency>
                <groupId>axis</groupId>
                <artifactId>axis-wsdl4j</artifactId>
                <version>1.5.1</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>   
           
               
            <!-- and a common one : -->
           
            <dependency>
                <groupId>commons-discovery</groupId>
                <artifactId>commons-discovery</artifactId>
                <version>0.2</version>
                <properties>
                    <war.bundle>true</war.bundle>               
                </properties>
            </dependency>


then add this in your web.xml

  <servlet>
    <servlet-name>AxisServlet</servlet-name>
    <display-name>Apache-Axis Servlet</display-name>
    <servlet-class>

        org.apache.axis.transport.http.AxisServlet
    </servlet-class>
  </servlet>

<!-- this one is optionnal-->
  <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>


<!-- this one is also optionnal-->
  <servlet-mapping>
    <servlet-name>SOAPMonitorService</servlet-name>
    <url-pattern>/SOAPMonitor</url-pattern>
  </servlet-mapping>



In order to avoid using a script and a deploy.wsdd, you should also use 
a server-config.wsdd. That allow you to launch your services right after 
the deployement of your war. (try server-config.wsdd in google, there is 
plenty of examples)

hope that'll help
Arnaud

P.S : if you want, i can send you an example but not in the mailinglist.



robert@elastica.com a écrit :

>I'm getting class not found exceptions with the following setup.
>
>axis jars in tomcat's shared lib.
>
>I've got the axis web app and I've also got my web app.
>
>my web app also defines the AxisServlet since it was complaining if I had a
>mapping refering to AxisServlet when it was only defined in the axis web.xml
>
>Is this deployment supported or must I deploy everything using axis as my web
>application?
>
>
>----------------------------------------------------------------
>This message was sent using IMP, the Internet Messaging Program.
>
>
>  
>