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

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">

<!-- A web application that installs the basic Axis servlets and their security environment -->

<web-app>

  <display-name>JBossAxis</display-name>

  <!-- This is the servlet used for "normal" calls -->

  <servlet>
    <servlet-name>JBossAxisServlet</servlet-name>
    <display-name>JbossAxis Servlet</display-name>
    <servlet-class> org.jboss.net.axis.server.AxisServiceServlet </servlet-class>
    <init-param>
      <param-name>org.jboss.net.axis.CONFIGURATION_CONTEXT</param-name>
      <param-value>jboss.net:service=Axis</param-value>
    </init-param>
    <init-param>
      <param-name>axis.enableListQuery</param-name>
      <param-value>false</param-value>
    </init-param>
  </servlet>

  <!-- This is the servlet used for dedicated flash 5 calls. Uncomment
       this and comment the previous configuration.
  <servlet>
    <servlet-name>JBossAxisServlet</servlet-name>
   <display-name>Flash 5 JbossAxis Servlet</display-name>
   <servlet-class>org.jboss.net.axis.server.FlashAxisServiceServlet</servlet-class>
      <init-param>
        <param-name>org.jboss.net.axis.CONFIGURATION_CONTEXT</param-name>
        <param-value>jboss.net:service=Axis</param-value>
   </init-param>
  </servlet>
  -->

  <!-- This is the admin servlet  -->

  <servlet>
    <servlet-name>JBossAxisAdminServlet</servlet-name>
    <display-name>JbossAxis Administration Servlet</display-name>
    <servlet-class> org.jboss.net.axis.server.AxisAdminServlet </servlet-class>
    <init-param>
      <param-name>org.jboss.net.axis.CONFIGURATION_CONTEXT</param-name>
      <param-value>jboss.net:service=Axis</param-value>
    </init-param>
    <load-on-startup>100</load-on-startup>
  </servlet>

  <!-- now the mappings -->

  <servlet-mapping>
    <servlet-name>JBossAxisServlet</servlet-name>
    <url-pattern>/servlet/AxisServlet</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>JBossAxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>JBossAxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>

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

  <servlet-mapping>
    <servlet-name>JBossAxisAdminServlet</servlet-name>
    <url-pattern>/admin/axis</url-pattern>
  </servlet-mapping>

  <!-- 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-list>

  <!-- we add a security constraint -->
  <security-constraint>

    <!-- for every exposed service -->
    <web-resource-collection>
      <web-resource-name>Secured</web-resource-name>
      <description>Authenticate every call</description>
      <url-pattern>/services/*</url-pattern>
      <http-method>HEAD</http-method>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <http-method>PUT</http-method>
      <http-method>DELETE</http-method>
    </web-resource-collection>

    <!-- Currently we let through every user, authenticated or not, because
         we rely on the service-specific security handlers to do authentiation
         and authorization. Commented out, because Jetty would not
         accept the * role. -->
    <!-- <auth-constraint>
           <role-name>*</role-name>
         </auth-constraint> -->

    <!-- no user data constraint here, this should be done for the individual services -->
  </security-constraint>

  <!-- we do BASIC authentication for now -->
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Axis basic authentication</realm-name>
  </login-config>

</web-app>
