geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/axis/src/test-resources/deployables/axis/WEB-INF geronimo-web.xml web.xml
Date Tue, 13 Jul 2004 17:21:55 GMT
dims        2004/07/13 10:21:55

  Added:       modules/axis LICENSE.txt NOTICE.txt project.properties
                        project.xml
               modules/axis/src/java/org/apache/geronimo/axis
                        AxisGbean.java WebServiceContainer.java
               modules/axis/src/test/org/apache/geronimo/axis
                        AxisGBeanTest.java TestServer.java
               modules/axis/src/test-resources/deployables/axis
                        EchoHeaders.jws StockQuoteService.jws happyaxis.jsp
                        index.html
               modules/axis/src/test-resources/deployables/axis/WEB-INF
                        geronimo-web.xml web.xml
  Log:
  Initial check-in of a AxisGBean and test case from Srinath (Uses jetty to deploy the axis servlet and checks if index.html can be read properly)
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/modules/axis/LICENSE.txt
  
  Index: LICENSE.txt
  ===================================================================
  
                                   Apache License
                             Version 2.0, January 2004
                          http://www.apache.org/licenses/
  
     TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  
     1. Definitions.
  
        "License" shall mean the terms and conditions for use, reproduction,
        and distribution as defined by Sections 1 through 9 of this document.
  
        "Licensor" shall mean the copyright owner or entity authorized by
        the copyright owner that is granting the License.
  
        "Legal Entity" shall mean the union of the acting entity and all
        other entities that control, are controlled by, or are under common
        control with that entity. For the purposes of this definition,
        "control" means (i) the power, direct or indirect, to cause the
        direction or management of such entity, whether by contract or
        otherwise, or (ii) ownership of fifty percent (50%) or more of the
        outstanding shares, or (iii) beneficial ownership of such entity.
  
        "You" (or "Your") shall mean an individual or Legal Entity
        exercising permissions granted by this License.
  
        "Source" form shall mean the preferred form for making modifications,
        including but not limited to software source code, documentation
        source, and configuration files.
  
        "Object" form shall mean any form resulting from mechanical
        transformation or translation of a Source form, including but
        not limited to compiled object code, generated documentation,
        and conversions to other media types.
  
        "Work" shall mean the work of authorship, whether in Source or
        Object form, made available under the License, as indicated by a
        copyright notice that is included in or attached to the work
        (an example is provided in the Appendix below).
  
        "Derivative Works" shall mean any work, whether in Source or Object
        form, that is based on (or derived from) the Work and for which the
        editorial revisions, annotations, elaborations, or other modifications
        represent, as a whole, an original work of authorship. For the purposes
        of this License, Derivative Works shall not include works that remain
        separable from, or merely link (or bind by name) to the interfaces of,
        the Work and Derivative Works thereof.
  
        "Contribution" shall mean any work of authorship, including
        the original version of the Work and any modifications or additions
        to that Work or Derivative Works thereof, that is intentionally
        submitted to Licensor for inclusion in the Work by the copyright owner
        or by an individual or Legal Entity authorized to submit on behalf of
        the copyright owner. For the purposes of this definition, "submitted"
        means any form of electronic, verbal, or written communication sent
        to the Licensor or its representatives, including but not limited to
        communication on electronic mailing lists, source code control systems,
        and issue tracking systems that are managed by, or on behalf of, the
        Licensor for the purpose of discussing and improving the Work, but
        excluding communication that is conspicuously marked or otherwise
        designated in writing by the copyright owner as "Not a Contribution."
  
        "Contributor" shall mean Licensor and any individual or Legal Entity
        on behalf of whom a Contribution has been received by Licensor and
        subsequently incorporated within the Work.
  
     2. Grant of Copyright License. Subject to the terms and conditions of
        this License, each Contributor hereby grants to You a perpetual,
        worldwide, non-exclusive, no-charge, royalty-free, irrevocable
        copyright license to reproduce, prepare Derivative Works of,
        publicly display, publicly perform, sublicense, and distribute the
        Work and such Derivative Works in Source or Object form.
  
     3. Grant of Patent License. Subject to the terms and conditions of
        this License, each Contributor hereby grants to You a perpetual,
        worldwide, non-exclusive, no-charge, royalty-free, irrevocable
        (except as stated in this section) patent license to make, have made,
        use, offer to sell, sell, import, and otherwise transfer the Work,
        where such license applies only to those patent claims licensable
        by such Contributor that are necessarily infringed by their
        Contribution(s) alone or by combination of their Contribution(s)
        with the Work to which such Contribution(s) was submitted. If You
        institute patent litigation against any entity (including a
        cross-claim or counterclaim in a lawsuit) alleging that the Work
        or a Contribution incorporated within the Work constitutes direct
        or contributory patent infringement, then any patent licenses
        granted to You under this License for that Work shall terminate
        as of the date such litigation is filed.
  
     4. Redistribution. You may reproduce and distribute copies of the
        Work or Derivative Works thereof in any medium, with or without
        modifications, and in Source or Object form, provided that You
        meet the following conditions:
  
        (a) You must give any other recipients of the Work or
            Derivative Works a copy of this License; and
  
        (b) You must cause any modified files to carry prominent notices
            stating that You changed the files; and
  
        (c) You must retain, in the Source form of any Derivative Works
            that You distribute, all copyright, patent, trademark, and
            attribution notices from the Source form of the Work,
            excluding those notices that do not pertain to any part of
            the Derivative Works; and
  
        (d) If the Work includes a "NOTICE" text file as part of its
            distribution, then any Derivative Works that You distribute must
            include a readable copy of the attribution notices contained
            within such NOTICE file, excluding those notices that do not
            pertain to any part of the Derivative Works, in at least one
            of the following places: within a NOTICE text file distributed
            as part of the Derivative Works; within the Source form or
            documentation, if provided along with the Derivative Works; or,
            within a display generated by the Derivative Works, if and
            wherever such third-party notices normally appear. The contents
            of the NOTICE file are for informational purposes only and
            do not modify the License. You may add Your own attribution
            notices within Derivative Works that You distribute, alongside
            or as an addendum to the NOTICE text from the Work, provided
            that such additional attribution notices cannot be construed
            as modifying the License.
  
        You may add Your own copyright statement to Your modifications and
        may provide additional or different license terms and conditions
        for use, reproduction, or distribution of Your modifications, or
        for any such Derivative Works as a whole, provided Your use,
        reproduction, and distribution of the Work otherwise complies with
        the conditions stated in this License.
  
     5. Submission of Contributions. Unless You explicitly state otherwise,
        any Contribution intentionally submitted for inclusion in the Work
        by You to the Licensor shall be under the terms and conditions of
        this License, without any additional terms or conditions.
        Notwithstanding the above, nothing herein shall supersede or modify
        the terms of any separate license agreement you may have executed
        with Licensor regarding such Contributions.
  
     6. Trademarks. This License does not grant permission to use the trade
        names, trademarks, service marks, or product names of the Licensor,
        except as required for reasonable and customary use in describing the
        origin of the Work and reproducing the content of the NOTICE file.
  
     7. Disclaimer of Warranty. Unless required by applicable law or
        agreed to in writing, Licensor provides the Work (and each
        Contributor provides its Contributions) on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
        implied, including, without limitation, any warranties or conditions
        of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
        PARTICULAR PURPOSE. You are solely responsible for determining the
        appropriateness of using or redistributing the Work and assume any
        risks associated with Your exercise of permissions under this License.
  
     8. Limitation of Liability. In no event and under no legal theory,
        whether in tort (including negligence), contract, or otherwise,
        unless required by applicable law (such as deliberate and grossly
        negligent acts) or agreed to in writing, shall any Contributor be
        liable to You for damages, including any direct, indirect, special,
        incidental, or consequential damages of any character arising as a
        result of this License or out of the use or inability to use the
        Work (including but not limited to damages for loss of goodwill,
        work stoppage, computer failure or malfunction, or any and all
        other commercial damages or losses), even if such Contributor
        has been advised of the possibility of such damages.
  
     9. Accepting Warranty or Additional Liability. While redistributing
        the Work or Derivative Works thereof, You may choose to offer,
        and charge a fee for, acceptance of support, warranty, indemnity,
        or other liability obligations and/or rights consistent with this
        License. However, in accepting such obligations, You may act only
        on Your own behalf and on Your sole responsibility, not on behalf
        of any other Contributor, and only if You agree to indemnify,
        defend, and hold each Contributor harmless for any liability
        incurred by, or claims asserted against, such Contributor by reason
        of your accepting any such warranty or additional liability.
  
     END OF TERMS AND CONDITIONS
  
     APPENDIX: How to apply the Apache License to your work.
  
        To apply the Apache License to your work, attach the following
        boilerplate notice, with the fields enclosed by brackets "[]"
        replaced with your own identifying information. (Don't include
        the brackets!)  The text should be enclosed in the appropriate
        comment syntax for the file format. We also recommend that a
        file or class name and description of purpose be included on the
        same "printed page" as the copyright notice for easier
        identification within third-party archives.
  
     Copyright [yyyy] [name of copyright owner]
  
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
  
  
  
  
  1.1                  incubator-geronimo/modules/axis/NOTICE.txt
  
  Index: NOTICE.txt
  ===================================================================
  This product includes software developed by
  The Apache Software Foundation (http://www.apache.org/).
  
  
  
  
  1.1                  incubator-geronimo/modules/axis/project.properties
  
  Index: project.properties
  ===================================================================
  ##
  ## $Revision: 1.1 $ $Date: 2004/07/13 17:21:55 $
  ##
  
  # the directory containing the geronimo website in CVS
  
  maven.repo.remote=http://dist.codehaus.org, http://www.ibiblio.org/maven, http://ws.apache.org/~dims/maven
  
  maven.junit.jvmargs=-Djava.security.auth.login.config=src/test-resources/data/login.config
  
  
  1.1                  incubator-geronimo/modules/axis/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
  
      Copyright 2004 The Apache Software Foundation
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  -->
    
  
  <!-- $Revision: 1.1 $ $Date: 2004/07/13 17:21:55 $ -->
  
  <project>
      <pomVersion>3</pomVersion>
      <extend>${basedir}/../../etc/project.xml</extend>
  
      <!-- ===================== -->
      <!-- Module Identification -->
      <!-- ===================== -->
  
      <name>Geronimo :: Axis</name>
      <id>geronimo-axis</id>
      <shortDescription>Axis Integration</shortDescription>
      <description>Geronimo Axis Integration</description>
      <url>http://geronimo.apache.org/modules/axis/</url>
      <siteDirectory>/www/geronimo.apache.org/modules/axis</siteDirectory>
      <distributionDirectory>/www/incubator.apache.org/projects/geronimo/builds/axis</distributionDirectory>
  
      <package>org.apache.geronimo.axis</package>
  
      <!-- ============ -->
      <!-- Dependencies -->
      <!-- ============ -->
  
      <dependencies>
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-xmlbeans-plugin</artifactId>
              <version>${pom.currentVersion}</version>
              <type>plugin</type>
          </dependency>
  
          <!-- needed for xmlbeans runtime-->
          <dependency>
              <groupId>xmlbeans</groupId>
              <artifactId>xbean-apache</artifactId>
              <version>1.0-DEV</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-kernel</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  	  <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-jetty</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-deployment</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-naming</artifactId>
              <version>${pom.currentVersion}</version>
              <properties>
                  <xmlbeans>true</xmlbeans>
              </properties>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-j2ee</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-security</artifactId>
              <version>${pom.currentVersion}</version>
              <properties>
                  <xmlbeans>true</xmlbeans>
              </properties>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-transaction</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-connector</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-common</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo</groupId>
              <artifactId>geronimo-system</artifactId>
              <version>${pom.currentVersion}</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-jta</artifactId>
              <version>1.0.1B-rc2</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-j2ee-jacc</artifactId>
              <version>1.0-rc2</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-j2ee-connector</artifactId>
              <version>1.5-rc2</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-j2ee-deployment</artifactId>
              <version>1.1-rc2</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-j2eeschema</artifactId>
              <version>${pom.currentVersion}</version>
              <properties>
                  <xmlbeans>true</xmlbeans>
              </properties>
          </dependency>
  
          <dependency>
              <groupId>jetty</groupId>
              <artifactId>org.mortbay.jetty</artifactId>
              <version>5.0.RC0</version>
          </dependency>
  
          <dependency>
              <groupId>jetty</groupId>
              <artifactId>org.mortbay.jaas</artifactId>
              <version>5.0.RC0</version>
          </dependency>
  
          <dependency>
              <groupId>mx4j</groupId>
              <artifactId>mx4j</artifactId>
              <version>2.0.1</version>
          </dependency>
  
          <!-- these are just needed to run the unit tests -->
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-servlet</artifactId>
              <version>2.4-rc2</version>
          </dependency>
  
          <dependency>
              <groupId>geronimo-spec</groupId>
              <artifactId>geronimo-spec-jsp</artifactId>
              <version>2.0-rc2</version>
          </dependency>
  
          <dependency>
              <groupId>commons-logging</groupId>
              <artifactId>commons-logging</artifactId>
              <version>1.0.3</version>
              <url>http://jakarta.apache.org/commons/logging/</url>
          </dependency>
  
          <dependency>
              <groupId>tomcat</groupId>
              <artifactId>jasper-compiler</artifactId>
              <version>5.0.16</version>
          </dependency>
  
          <dependency>
              <groupId>tomcat</groupId>
              <artifactId>jasper-runtime</artifactId>
              <version>5.0.16</version>
          </dependency>
  
          <dependency>
              <groupId>commons-el</groupId>
              <artifactId>commons-el</artifactId>
              <version>1.0</version>
              <url>http://jakarta.apache.org/commons/el/</url>
          </dependency>
  
          <dependency>
              <groupId>ant</groupId>
              <artifactId>ant</artifactId>
              <version>1.5</version>
          </dependency>
  
          <dependency>
              <groupId>xerces</groupId>
              <artifactId>xercesImpl</artifactId>
              <version>2.6.0</version>
          </dependency>
  
          <dependency>
              <groupId>xerces</groupId>
              <artifactId>xmlParserAPIs</artifactId>
              <version>2.2.1</version>
          </dependency>
  
          <dependency>
              <groupId>cglib</groupId>
              <artifactId>cglib-full</artifactId>
              <version>2.0</version>
              <url>http://cglib.sf.net/</url>
          </dependency>
  
          <dependency>
              <id>concurrent</id>
              <version>1.3.2</version>
          </dependency>
  
          <dependency>
              <groupId>regexp</groupId>
              <artifactId>regexp</artifactId>
              <version>1.3</version>
              <url>http://jakarta.apache.org/regexp</url>
          </dependency>
  
          <dependency>
              <groupId>tranql</groupId>
              <artifactId>tranql</artifactId>
              <version>1.0-SNAPSHOT</version>
              <url>http://tranql.codehaus.org</url>
          </dependency>
  	<dependency>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
              <version>1.2.8</version>
              <url>http://jakarta.apache.org/log4j</url>
          </dependency>
  
          <!-- Module Dependencies -->
          <dependency>
              <groupId>axis</groupId>
              <artifactId>axis</artifactId>
              <version>SNAPSHOT</version>
              <properties>
                  <module>true</module>
              </properties>
          </dependency>
          <dependency>
              <groupId>axis</groupId>
              <artifactId>commons-discovery</artifactId>
              <version>SNAPSHOT</version>
              <properties>
                  <module>true</module>
              </properties>
          </dependency>
          <dependency>
              <groupId>axis</groupId>
              <artifactId>commons-logging</artifactId>
              <version>SNAPSHOT</version>
              <properties>
                  <module>true</module>
              </properties>
          </dependency>
          <dependency>
              <groupId>axis</groupId>
              <artifactId>jaxrpc</artifactId>
              <version>SNAPSHOT</version>
              <properties>
                  <module>true</module>
              </properties>
          </dependency>
          <dependency>
              <groupId>axis</groupId>
              <artifactId>saaj</artifactId>
              <version>SNAPSHOT</version>
              <properties>
                  <module>true</module>
              </properties>
          </dependency>
          <dependency>
              <groupId>axis</groupId>
              <artifactId>wsdl4j</artifactId>
              <version>SNAPSHOT</version>
              <properties>
                  <module>true</module>
              </properties>
          </dependency>
  
      </dependencies>
  
  
      <!-- =================== -->
      <!-- Build Specification -->
      <!-- =================== -->
  
      <build>
          <resources>
              <resource>
                  <directory>${basedir}/target/xmlbeans</directory>
                  <includes>schema/**</includes>
              </resource>
          </resources>
          <unitTest>
              <includes>
                  <include>**/*Test.java</include>
              </includes>
              <excludes>
                  <exclude>**/Abstract*.java</exclude>
              </excludes>
              <resources>
                  <resource>
                      <directory>${basedir}/src/test-resources</directory>
                  </resource>
              </resources>
          </unitTest>
      </build>
  </project>
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/AxisGbean.java
  
  Index: AxisGbean.java
  ===================================================================
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.geronimo.axis;
  
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.GBeanLifecycle;
  import org.apache.geronimo.gbean.WaitingException;
  import org.apache.geronimo.kernel.Kernel;
  import org.apache.geronimo.kernel.jmx.JMXUtil;
  
  import javax.management.ObjectName;
  
  public class AxisGbean implements GBeanLifecycle {
      private final String name;
      private final Kernel kernel;
      private static final GBeanInfo GBEAN_INFO;
      private final ObjectName objectName;
  
      private WebServiceContainer wscontiner;
  
      static {
          GBeanInfoFactory infoFactory = new GBeanInfoFactory("AxisGbean",
                  AxisGbean.class);
          //attributes
          infoFactory.addAttribute("Name", String.class, true);
          infoFactory.addAttribute("kernel", Kernel.class, false);
          infoFactory.addAttribute("objectName", String.class, false);
          //operations
          infoFactory.addOperation("echo", new Class[]{String.class});
          infoFactory.setConstructor(new String[]{"kernel", "Name", "objectName"});
          GBEAN_INFO = infoFactory.getBeanInfo();
      }
  
      public AxisGbean(Kernel kernel, String name, String objectName) {
          this.name = name;
          this.kernel = kernel;
          this.objectName = JMXUtil.getObjectName(objectName);
          wscontiner = new WebServiceContainer(kernel, this.objectName);
      }
  
      /* (non-Javadoc)
       * @see org.apache.geronimo.gbean.GBeanLifecycle#doFail()
       */
      public void doFail() {
          System.out.println("Axis GBean has failed");
      }
  
      /* (non-Javadoc)
       * @see org.apache.geronimo.gbean.GBeanLifecycle#doStart()
       */
      public void doStart() throws WaitingException, Exception {
          System.out.println("Axis GBean has started");
          System.out.println(kernel);
          System.out.println(objectName);
          wscontiner.doStart();
      }
  
      /* (non-Javadoc)
       * @see org.apache.geronimo.gbean.GBeanLifecycle#doStop()
       */
      public void doStop() throws WaitingException, Exception {
          System.out.println("Axis GBean has stoped");
          wscontiner.doStop();
      }
  
      public String echo(String msg) {
          return msg;
      }
  
      public static GBeanInfo getGBeanInfo() {
          return GBEAN_INFO;
      }
  
      public Kernel getKernel() {
          return kernel;
      }
  
      public String getName() {
          return name;
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceContainer.java
  
  Index: WebServiceContainer.java
  ===================================================================
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.geronimo.axis;
  
  import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
  import org.apache.geronimo.gbean.jmx.GBeanMBean;
  import org.apache.geronimo.jetty.JettyContainerImpl;
  import org.apache.geronimo.jetty.JettyWebAppContext;
  import org.apache.geronimo.jetty.connector.HTTPConnector;
  import org.apache.geronimo.kernel.Kernel;
  import org.apache.geronimo.transaction.GeronimoTransactionManager;
  import org.apache.geronimo.transaction.UserTransactionImpl;
  
  import javax.management.MBeanServer;
  import javax.management.MalformedObjectNameException;
  import javax.management.ObjectName;
  import java.net.URI;
  import java.net.URL;
  import java.util.Collections;
  import java.util.HashSet;
  import java.util.Set;
  
  public class WebServiceContainer {
      private final ObjectName axisGBeanName;
      private final Kernel kernel;
      private ObjectName containerName;
      private MBeanServer mbServer;
      private Set containerPatterns;
      private ObjectName tmName;
      private ObjectName tcaName;
      private ObjectName appName;
      private ObjectName connectorName;
      private String webappsUrl;
      private final boolean startJetty = true;
  
      public WebServiceContainer(Kernel kernel, ObjectName axisGBeanName) {
          try {
              this.axisGBeanName = axisGBeanName;
              containerName = new ObjectName("geronimo.jetty:role=Container");
              this.kernel = kernel;
              mbServer = kernel.getMBeanServer();
              containerPatterns = Collections.singleton(containerName);
              connectorName = new ObjectName("geronimo.jetty:role=Connector");
              appName = new ObjectName("geronimo.jetty:app=test");
              tmName = new ObjectName("geronimo.test:role=TransactionManager");
              tcaName =
                      new ObjectName(
                              "geronimo.test:role=ConnectionTrackingCoordinator");
          } catch (MalformedObjectNameException e) {
              e.printStackTrace();
              throw new RuntimeException(e);
          }
      }
  
      public void init() {
      }
  
      public void doStart() throws Exception {
          if (startJetty)
              startJetty();
          URL url = Thread.currentThread().getContextClassLoader().getResource(
                  "deployables/axis/");
          GBeanMBean app = new GBeanMBean(JettyWebAppContext.GBEAN_INFO);
          app.setAttribute("URI", URI.create(url.toString()));
          app.setAttribute("contextPath", "/axis");
          app.setAttribute("componentContext", null);
          UserTransactionImpl userTransaction = new UserTransactionImpl();
          app.setAttribute("userTransaction", userTransaction);
          app.setReferencePatterns("Configuration", Collections.EMPTY_SET);
          app.setReferencePatterns("JettyContainer", containerPatterns);
          app.setReferencePatterns("TransactionManager",
                  Collections.singleton(tmName));
          app.setReferencePatterns("TrackedConnectionAssociator",
                  Collections.singleton(tcaName));
          start(appName, app);
      }
  
      public void doStop() throws Exception {
          stop(tcaName);
          stop(tmName);
          stop(connectorName);
          stop(containerName);
      }
  
      private void startJetty() throws Exception {
          GBeanMBean connector;
          GBeanMBean tm;
          GBeanMBean ctc;
          GBeanMBean container;
          container = new GBeanMBean(JettyContainerImpl.GBEAN_INFO);
          connector = new GBeanMBean(HTTPConnector.GBEAN_INFO);
          connector.setAttribute("port", new Integer(5678));
          connector.setReferencePatterns("JettyContainer", containerPatterns);
          start(containerName, container);
          start(connectorName, connector);
          tm = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO);
          Set patterns = new HashSet();
          patterns.add(
                  ObjectName.getInstance(
                          "geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
          tm.setReferencePatterns("resourceManagers", patterns);
          start(tmName, tm);
          ctc = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
          start(tcaName, ctc);
      }
  
      private void start(ObjectName name, Object instance) throws Exception {
          mbServer.registerMBean(instance, name);
          mbServer.invoke(name, "start", null, null);
      }
  
      private void stop(ObjectName name) throws Exception {
          mbServer.invoke(name, "stop", null, null);
          mbServer.unregisterMBean(name);
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/AxisGBeanTest.java
  
  Index: AxisGBeanTest.java
  ===================================================================
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  package org.apache.geronimo.axis;
  
  import junit.framework.TestCase;
  import org.apache.geronimo.gbean.jmx.GBeanMBean;
  import org.apache.geronimo.kernel.Kernel;
  
  import javax.management.ObjectName;
  import java.io.BufferedReader;
  import java.io.InputStreamReader;
  import java.net.HttpURLConnection;
  import java.net.URL;
  import java.net.URLClassLoader;
  
  public class AxisGBeanTest extends TestCase {
      private ObjectName name;
      private ObjectName name2;
      private Kernel kernel;
  
      public void testLoad() throws Exception {
          String textFileurl = "http://localhost:5678/axis/index.html";
          ClassLoader cl = getClass().getClassLoader();
          ClassLoader myCl = new URLClassLoader(new URL[0], cl);
          GBeanMBean gbean = new GBeanMBean(AxisGbean.getGBeanInfo(), myCl);
          gbean.setAttribute("Name", "Test");
          kernel.loadGBean(name, gbean);
          kernel.startGBean(name);
          System.out.println(kernel.getMBeanServer().getAttribute(name, "state"));
          System.out.println(
                  kernel.getMBeanServer().invoke(name, "echo",
                          new Object[]{"Hello"},
                          new String[]{String.class.getName()}));
          HttpURLConnection connection = (HttpURLConnection) new URL(textFileurl).openConnection();
          BufferedReader reader = new BufferedReader(
                  new InputStreamReader(connection.getInputStream()));
          connection.getResponseCode();
          String line = reader.readLine();
          while (line != null) {
              System.out.println(line);
              line = reader.readLine();
          }
          connection.disconnect();
          kernel.stopGBean(name);
          kernel.unloadGBean(name);
      }
  
      protected void setUp() throws Exception {
          name = new ObjectName("test:name=AxisGBean");
          name2 = new ObjectName("test:name=AxisGBean2");
          kernel = new Kernel("test.kernel", "test");
          kernel.boot();
      }
  
      protected void tearDown() throws Exception {
          kernel.shutdown();
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/TestServer.java
  
  Index: TestServer.java
  ===================================================================
  /**
   *
   * Copyright 2003-2004 The Apache Software Foundation
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  package org.apache.geronimo.axis;
  
  import org.apache.geronimo.gbean.jmx.GBeanMBean;
  import org.apache.geronimo.kernel.Kernel;
  
  import javax.management.ObjectName;
  import java.net.URL;
  import java.net.URLClassLoader;
  
  public class TestServer {
      private Kernel kernel;
      private ObjectName name;
  
      public TestServer() throws Exception {
          name = new ObjectName("test:name=AxisGBean");
          kernel = new Kernel("test.kernel", "test");
          kernel.boot();
  
          ClassLoader cl = getClass().getClassLoader();
          ClassLoader myCl = new URLClassLoader(new URL[0], cl);
          GBeanMBean gbean = new GBeanMBean(AxisGbean.getGBeanInfo(), myCl);
          gbean.setAttribute("Name", "Test");
          kernel.loadGBean(name, gbean);
          kernel.startGBean(name);
          System.in.read();
          System.out.println("Shutting down the kernel");
          kernel.stopGBean(name);
          kernel.unloadGBean(name);
          kernel.shutdown();
      }
  
      public static void main(String[] args) throws Exception {
          TestServer test = new TestServer();
      }
  
      /* (non-Javadoc)
       * @see java.lang.Object#finalize()
       */
      protected void finalize() throws Throwable {
      }
  
  }
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test-resources/deployables/axis/EchoHeaders.jws
  
  Index: EchoHeaders.jws
  ===================================================================
  /*
   * Copyright 2002,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  import org.apache.axis.AxisFault;
  import org.apache.axis.MessageContext;
  import org.apache.axis.transport.http.HTTPConstants;
  
  import javax.servlet.http.HttpServletRequest;
  import java.util.Enumeration;
  import java.util.ArrayList;
  import java.util.Iterator;
  
  /**
   * class to list headers sent in request as a string array
   */
  public class EchoHeaders {
  
      /**
       * demo message context stuff
       * @return list of request headers
       */
      public String[] list() {
          HttpServletRequest request = getRequest();
          Enumeration headers=request.getHeaderNames();
          ArrayList list=new ArrayList();
          while (headers.hasMoreElements()) {
              String h = (String) headers.nextElement();
              String header=h+':'+request.getHeader(h);
              list.add(header);
          }
          String[] results=new String[list.size()];
          for(int i=0;i<list.size();i++) {
              results[i]=(String) list.get(i);
          }
          return results;
      }
  
      /**
       * get the caller; may involve reverse DNS
       * @return
       */
      public String whoami() {
          HttpServletRequest request = getRequest();
          String remote=request.getRemoteHost();
          return "Hello caller from "+remote;
      }
  
      /**
       * very simple method to echo the param.
       * @param param
       * @return
       */
      public String echo(String param) {
          return param;
      }
      
      /**
       * throw an axis fault with the text included
       */
      public void throwAxisFault(String param) throws AxisFault {
          throw new AxisFault(param);
      }
      
      public void throwException(String param) throws Exception { 
          throw new Exception(param);
      }
  
      /**
       * thow a runtime exception
       */
      public void throwRuntimeException(String param) { 
          throw new RuntimeException(param);
      }
      
      /**
       * helper
       * @return
       */
      private HttpServletRequest getRequest() {
          MessageContext context = MessageContext.getCurrentContext();
          HttpServletRequest req = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
          return req;
      }
  
  }
  
  
  1.1                  incubator-geronimo/modules/axis/src/test-resources/deployables/axis/StockQuoteService.jws
  
  Index: StockQuoteService.jws
  ===================================================================
  /*
   * Copyright 2001,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  import org.apache.axis.utils.XMLUtils;
  import org.w3c.dom.Document;
  import org.w3c.dom.Element;
  import org.w3c.dom.NodeList;
  
  /**
   * See \samples\stock\readme for info.
   *
   * @author Sanjiva Weerawarana (sanjiva@watson.ibm.com)
   * @author Doug Davis (dug@us.ibm.com)
   */
  public class StockQuoteService {
    public float getQuote (String symbol) throws Exception {
      // get a real (delayed by 20min) stockquote from 
      // http://www.xmltoday.com/examples/stockquote/. The IP addr 
      // below came from the host that the above form posts to ..
  
      if ( symbol.equals("XXX") ) return( (float) 66.25 );
  
  
      Document doc = null ;
      
      doc = XMLUtils.newDocument( "http://www.xmltoday.com/examples/" +
                                  "stockquote/getxmlquote.vep?s="+symbol );
  
      Element  elem = doc.getDocumentElement();
      NodeList list = elem.getElementsByTagName("stock_quote");
  
      elem = (Element) list.item(0);
      list = elem.getElementsByTagName( "price" );
      elem = (Element) list.item( 0 );
      String quoteStr = elem.getAttribute("value");
      try {
        return Float.valueOf(quoteStr).floatValue();
      } catch (NumberFormatException e1) {
        // maybe its an int?
        try {
          return Integer.valueOf(quoteStr).intValue() * 1.0F;
        } catch (NumberFormatException e2) {
          return -1.0F;
        }
      }
    }
  }
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test-resources/deployables/axis/happyaxis.jsp
  
  Index: happyaxis.jsp
  ===================================================================
  <html>
  <%@ page import="java.io.InputStream,
                   java.io.IOException,
                   javax.xml.parsers.SAXParser,
                   javax.xml.parsers.SAXParserFactory"
     session="false" %>
   <%
      /*
   * Copyright 2002,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  %>
  <head>
  <title>Axis Happiness Page</title>
  </head>
  <body bgcolor='#ffffff'>
  <%!
  
      /*
       * Happiness tests for axis. These look at the classpath and warn if things
       * are missing. Normally addng this much code in a JSP page is mad
       * but here we want to validate JSP compilation too, and have a drop-in
       * page for easy re-use
       * @author Steve 'configuration problems' Loughran
       * @author dims
       * @author Brian Ewins
       */
  
  
      /**
       * Get a string providing install information.
       * TODO: make this platform aware and give specific hints
       */
      public String getInstallHints(HttpServletRequest request) {
  
          String hint=
              "<B><I>Note:</I></B> On Tomcat 4.x and Java1.4, you may need to put libraries that contain "
              +"java.* or javax.* packages into CATALINA_HOME/common/lib"
              +"<br>jaxrpc.jar and saaj.jar are two such libraries.";
          return hint;
      }
  
      /**
       * test for a class existing
       * @param classname
       * @return class iff present
       */
      Class classExists(String classname) {
          try {
              return Class.forName(classname);
          } catch (ClassNotFoundException e) {
              return null;
          }
      }
  
      /**
       * test for resource on the classpath
       * @param resource
       * @return true iff present
       */
      boolean resourceExists(String resource) {
          boolean found;
          InputStream instream=this.getClass().getResourceAsStream(resource);
          found=instream!=null;
          if(instream!=null) {
              try {
                  instream.close();
              } catch (IOException e) {
              }
          }
          return found;
      }
  
      /**
       * probe for a class, print an error message is missing
       * @param out stream to print stuff
       * @param category text like "warning" or "error"
       * @param classname class to look for
       * @param jarFile where this class comes from
       * @param errorText extra error text
       * @param homePage where to d/l the library
       * @return the number of missing classes
       * @throws IOException
       */
      int probeClass(JspWriter out,
                     String category,
                     String classname,
                     String jarFile,
                     String description,
                     String errorText,
                     String homePage) throws IOException {
          try {
              Class clazz = classExists(classname);
              if(clazz == null)  {
                 String url="";
                 if(homePage!=null) {
                    url="<br>  See <a href="+homePage+">"+homePage+"</a>";
                 }
                 out.write("<p>"+category+": could not find class "+classname
                     +" from file <b>"+jarFile
                     +"</b><br>  "+errorText
                     +url
                     +"<p>");
                 return 1;
              } else {
                 String location = getLocation(out, clazz);
                 if(location == null) {
                    out.write("Found "+ description + " (" + classname + ")<br>");
                 }
                 else {
                    out.write("Found "+ description + " (" + classname + ") at " + location + "<br>");
                 }
                 return 0;
              }
          } catch(NoClassDefFoundError ncdfe) { 
              String url="";
              if(homePage!=null) {
                  url="<br>  See <a href="+homePage+">"+homePage+"</a>";
              }
              out.write("<p>"+category+": could not find a dependency"
                      +" of class "+classname
                      +" from file <b>"+jarFile
                      +"</b><br> "+errorText
                      +url
                      +"<br>The root cause was: "+ncdfe.getMessage()
                      +"<br>This can happen e.g. if "+classname+" is in" 
                      +" the 'common' classpath, but a dependency like "
                      +" activation.jar is only in the webapp classpath."
                      +"<p>");
              return 1;
          }
      }
  
      /**
       * get the location of a class
       * @param out
       * @param clazz
       * @return the jar file or path where a class was found
       */
  
      String getLocation(JspWriter out,
                         Class clazz) {
          try {
              java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
              String location = url.toString();
              if(location.startsWith("jar")) {
                  url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
                  location = url.toString();
              } 
              
              if(location.startsWith("file")) {
                  java.io.File file = new java.io.File(url.getFile());
                  return file.getAbsolutePath();
              } else {
                  return url.toString();
              }
          } catch (Throwable t){
          }
          return "an unknown location";
      }
  
      /**
       * a class we need if a class is missing
       * @param out stream to print stuff
       * @param classname class to look for
       * @param jarFile where this class comes from
       * @param errorText extra error text
       * @param homePage where to d/l the library
       * @throws IOException when needed
       * @return the number of missing libraries (0 or 1)
       */
      int needClass(JspWriter out,
                     String classname,
                     String jarFile,
                     String description,
                     String errorText,
                     String homePage) throws IOException {
          return probeClass(out,
                  "<b>Error</b>",
                  classname,
                  jarFile,
                  description,
                  errorText,
                  homePage);
      }
  
      /**
       * print warning message if a class is missing
       * @param out stream to print stuff
       * @param classname class to look for
       * @param jarFile where this class comes from
       * @param errorText extra error text
       * @param homePage where to d/l the library
       * @throws IOException when needed
       * @return the number of missing libraries (0 or 1)
       */
      int wantClass(JspWriter out,
                     String classname,
                     String jarFile,
                     String description,
                     String errorText,
                     String homePage) throws IOException {
          return probeClass(out,
                  "<b>Warning</b>",
                  classname,
                  jarFile,
                  description,
                  errorText,
                  homePage);
      }
  
      /**
       * probe for a resource existing,
       * @param out
       * @param resource
       * @param errorText
       * @throws Exception
       */
      int wantResource(JspWriter out,
                        String resource,
                        String errorText) throws Exception {
          if(!resourceExists(resource)) {
              out.write("<p><b>Warning</b>: could not find resource "+resource
                          +"<br>"
                          +errorText);
              return 0;
          } else {
              out.write("found "+resource+"<br>");
              return 1;
          }
      }
  
  
      /**
       *  get servlet version string
       *
       */
  
      public String getServletVersion() {
          ServletContext context=getServletConfig().getServletContext();
          int major = context.getMajorVersion();
          int minor = context.getMinorVersion();
          return Integer.toString(major) + '.' + Integer.toString(minor);
      }
  
  
  
      /**
       * what parser are we using.
       * @return the classname of the parser
       */
      private String getParserName() {
          SAXParser saxParser = getSAXParser();
          if (saxParser == null) {
              return "Could not create an XML Parser";
          }
  
          // check to what is in the classname
          String saxParserName = saxParser.getClass().getName();
          return saxParserName;
      }
  
      /**
       * Create a JAXP SAXParser
       * @return parser or null for trouble
       */
      private SAXParser getSAXParser() {
          SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
          if (saxParserFactory == null) {
              return null;
          }
          SAXParser saxParser = null;
          try {
              saxParser = saxParserFactory.newSAXParser();
          } catch (Exception e) {
          }
          return saxParser;
      }
  
      /**
       * get the location of the parser
       * @return path or null for trouble in tracking it down
       */
  
      private String getParserLocation(JspWriter out) {
          SAXParser saxParser = getSAXParser();
          if (saxParser == null) {
              return null;
          }
          String location = getLocation(out,saxParser.getClass());
          return location;
      }
      %>
  <html><head><title>Axis Happiness Page</title></head>
  <body>
  <h1>Axis Happiness Page</h1>
  <h2>Examining webapp configuration</h2>
  
  <p>
  <h3>Needed Components</h3>
  <%
      int needed=0,wanted=0;
  
      /**
       * the essentials, without these Axis is not going to work
       */
      needed=needClass(out, "javax.xml.soap.SOAPMessage",
              "saaj.jar",
              "SAAJ API",
              "Axis will not work",
              "http://xml.apache.org/axis/");
  
      needed+=needClass(out, "javax.xml.rpc.Service",
              "jaxrpc.jar",
              "JAX-RPC API",
              "Axis will not work",
              "http://xml.apache.org/axis/");
  
      needed+=needClass(out, "org.apache.axis.transport.http.AxisServlet",
              "axis.jar",
              "Apache-Axis",
              "Axis will not work",
              "http://xml.apache.org/axis/");
  
      needed+=needClass(out, "org.apache.commons.discovery.Resource",
              "commons-discovery.jar",
              "Jakarta-Commons Discovery",
              "Axis will not work",
              "http://jakarta.apache.org/commons/discovery.html");
  
      needed+=needClass(out, "org.apache.commons.logging.Log",
              "commons-logging.jar",
              "Jakarta-Commons Logging",
              "Axis will not work",
              "http://jakarta.apache.org/commons/logging.html");
  
      needed+=needClass(out, "org.apache.log4j.Layout",
              "log4j-1.2.8.jar",
              "Log4j",
              "Axis may not work",
              "http://jakarta.apache.org/log4j");
  
      //should we search for a javax.wsdl file here, to hint that it needs
      //to go into an approved directory? because we dont seem to need to do that.
      needed+=needClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl",
              "wsdl4j.jar",
              "IBM's WSDL4Java",
              "Axis will not work",
              null);
  
      needed+=needClass(out, "javax.xml.parsers.SAXParserFactory",
              "xerces.jar",
              "JAXP implementation",
              "Axis will not work",
              "http://xml.apache.org/xerces-j/");
  
      needed+=needClass(out,"javax.activation.DataHandler",
              "activation.jar",
              "Activation API",
              "Axis will not work",
              "http://java.sun.com/products/javabeans/glasgow/jaf.html");
  %>
  <h3>Optional Components</h3>
  <%
      /*
       * now the stuff we can live without
       */
      wanted+=wantClass(out,"javax.mail.internet.MimeMessage",
              "mail.jar",
              "Mail API",
              "Attachments will not work",
              "http://java.sun.com/products/javamail/");
  
      wanted+=wantClass(out,"org.apache.xml.security.Init",
              "xmlsec.jar",
              "XML Security API",
              "XML Security is not supported",
              "http://xml.apache.org/security/");
  
      wanted += wantClass(out, "javax.net.ssl.SSLSocketFactory",
              "jsse.jar or java1.4+ runtime",
              "Java Secure Socket Extension",
              "https is not supported",
              "http://java.sun.com/products/jsse/");
      /*
       * resources on the classpath path
       */
      /* broken; this is a file, not a resource
      wantResource(out,"/server-config.wsdd",
              "There is no server configuration file;"
              +"run AdminClient to create one");
      */
      /* add more libraries here */
  
      out.write("<h3>");
      //is everythng we need here
      if(needed==0) {
         //yes, be happy
          out.write("<i>The core axis libraries are present. </i>");
      } else {
          //no, be very unhappy
          response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
          out.write("<i>"
                  +needed
                  +" core axis librar"
                  +(needed==1?"y is":"ies are")
                  +" missing</i>");
      }
      //now look at wanted stuff
      if(wanted>0) {
          out.write("<i>"
                  +wanted
                  +" optional axis librar"
                  +(wanted==1?"y is":"ies are")
                  +" missing</i>");
      } else {
          out.write("The optional components are present.");
      }
      out.write("</h3>");
      //hint if anything is missing
      if(needed>0 || wanted>0 ) {
          out.write(getInstallHints(request));
      }
  
      %>
      <p>
      <B><I>Note:</I></B> Even if everything this page probes for is present, there is no guarantee your
      web service will work, because there are many configuration options that we do
      not check for. These tests are <i>necessary</i> but not <i>sufficient</i>
      <hr>
  
      <h2>Examining Application Server</h2>
      <%
          String servletVersion=getServletVersion();
          String xmlParser=getParserName();
          String xmlParserLocation = getParserLocation(out);
  
      %>
      <table>
          <tr><td>Servlet version</td><td><%= servletVersion %></td></tr>
          <tr><td>XML Parser</td><td><%= xmlParser %></td></tr>
          <tr><td>XML ParserLocation</td><td><%= xmlParserLocation %></td></tr>
      </table>
  <% if(xmlParser.indexOf("crimson")>=0) { %>
      <p>
      <b>We recommend <a href="http://xml.apache.org/xerces2-j/">Xerces 2</a>
          over Crimson as the XML parser for Axis</b>
      </p>
  <%    } %>
  
      <h2>Examining System Properties</h2>
  <%
      /** 
       * Dump the system properties
       */
      java.util.Enumeration e=null;
      try {
          e= System.getProperties().propertyNames();
      } catch (SecurityException se) {
      }
      if(e!=null) {
          out.write("<pre>");
          for (;e.hasMoreElements();) {
              String key = (String) e.nextElement();
              out.write(key + "=" + System.getProperty(key)+"\n");
          }
          out.write("</pre><p>");
      } else {
          out.write("System properties are not accessible<p>");
      }
  %>
      <hr>
      Platform: <%= getServletConfig().getServletContext().getServerInfo()  %>
  </body>
  </html>
  
  
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test-resources/deployables/axis/index.html
  
  Index: index.html
  ===================================================================
  <html>
  
  <head>
  <meta http-equiv="Content-Type"
  content="text/html; charset=iso-8859-1">
  <title>Apache-Axis</title>
  </head>
  
  <body bgcolor="#FFFFFF">
  
  <h1 align="center">Apache-AXIS</h1>
  
  <p>Hello! <em>Welcome</em> to Apache-Axis.</p>
  
  <p>What do you want to do today?</p>
  
  <ul>
      <li><a href="happyaxis.jsp">Validate</a>
          the local installation's configuration<br>
          <i>see below if this does not work.</i></li>
      <li><a href="servlet/AxisServlet">View</a>
          the list of deployed Web services</li>
      <li><a href="EchoHeaders.jws?method=list">
          Call a local endpoint</a> that list's the caller's
          http headers (or see its
          <a href="EchoHeaders.jws?wsdl">WSDL</a>). 
      <li><a href="http://xml.apache.org/axis">Visit</a>
          the Apache-Axis Home Page</li>
      <li><a href="servlet/AdminServlet">Administer Axis</a> <br>
          [disabled by default for security reasons]</li>
  </ul>
  To enable the disabled features, uncomment the appropriate declarations in 
  WEB-INF/web.xml in the webapplication and restart it.
  <h3>Validating Axis</h3>
  
  If the "happyaxis" validation page displays an exception instead of a 
  status page, the likely cause is that you have multiple XML parsers in 
  your classpath. Clean up your classpath by eliminating extraneous parsers. 
  
  <p>
  If you have problems getting Axis to work, consult the Axis 
  <a
  href="http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages">Wiki</a>
  and then try the Axis user mailing list. 
  </body>
  </html>
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test-resources/deployables/axis/WEB-INF/geronimo-web.xml
  
  Index: geronimo-web.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
  
      Copyright 2004 The Apache Software Foundation
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  -->
    
  <jetty:web-app
      xmlns:jetty="http://geronimo.apache.org/xml/ns/web/jetty"
      configId="org/apache/geronimo/axis"
      >
      <jetty:context-root>/axis</jetty:context-root>
      <jetty:context-priority-classloader>false</jetty:context-priority-classloader>
  </jetty:web-app>
  
  
  
  1.1                  incubator-geronimo/modules/axis/src/test-resources/deployables/axis/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?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>
  
   <!-- uncomment this if you want the admin servlet -->
   <!--
    <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>
  
  
  

Mime
View raw message