Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2556

application.xml contextRoot is ignored when war contains @WebService

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 7.1.0.Final
    • 7.0.2.Final, 7.1.0.Alpha1
    • Web Services
    • None
    • Hide

      mvn archetype:generate \
      -DarchetypeArtifactId=jboss-javaee6-ear-webapp \
      -DarchetypeGroupId=org.jboss.spec.archetypes \
      -DarchetypeVersion=7.0.2.CR1 \
      -DgroupId=test1 \
      -DartifactId=test1 \
      -Dversion=0.0.1-SNAPSHOT

      Add to test1-web/pom.xml:

      <dependency>
      <groupId>org.jboss.spec</groupId>
      <artifactId>jboss-javaee-6.0</artifactId>
      <version>1.0.0.Final</version>
      <type>pom</type>
      <scope>provided</scope>
      </dependency>

      Add this class to test1-web:

      @Stateless
      @LocalBean
      public class SampleWebService {
      @WebMethod
      public String sayHello(String name)

      { return "Hello " + name + "."; }

      }

      Show
      mvn archetype:generate \ -DarchetypeArtifactId=jboss-javaee6-ear-webapp \ -DarchetypeGroupId=org.jboss.spec.archetypes \ -DarchetypeVersion=7.0.2.CR1 \ -DgroupId=test1 \ -DartifactId=test1 \ -Dversion=0.0.1-SNAPSHOT Add to test1-web/pom.xml: <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>1.0.0.Final</version> <type>pom</type> <scope>provided</scope> </dependency> Add this class to test1-web: @Stateless @LocalBean public class SampleWebService { @WebMethod public String sayHello(String name) { return "Hello " + name + "."; } }

      See Steps to reproduce below.

      When deploying the archetype without modification:

      10:12:57,545 INFO [org.jboss.web] (MSC service thread 1-6) registering web context: /test1

      When adding a @WebService annotated class to the WAR:

      10:15:33,203 INFO [org.jboss.web] (MSC service thread 1-1) registering web context: /test1-web-0.0.1-SNAPSHOT

            rhn-cservice-bbaranow Bartosz Baranowski
            agattik Alexandre Gattiker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: