Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-76

Incorrect <servlet-name> in org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.1.CR1, 1.1.0.Alpha1
    • 1.0.0.GA
    • None
    • None
    • GlassFish V3

    • Hide

      Many ways to fix the test. One way is to change the <servlet-name> in web.xml as specified above

      Show
      Many ways to fix the test. One way is to change the <servlet-name> in web.xml as specified above

      For org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war, web.xml and WebService class are listed below:

      <servlet>
      <servlet-name>TestWebService</servlet-name>
      <servlet-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-class>
      <load-on-startup>1</load-on-startup>
      </servlet>

      @WebService(name="SheepWS")
      public class SheepWSEndPoint {
      }

      There is no webservices.xml packaged in the war file and web.xml doesn't have metadata-complete attribute. From the 109 spec's point of view, annotation processing kicks in, and it will create a virtual <webservice-description> in a webservices.xml for every found @WebService in the war. For example:

      <webservice-description>
      ...
      <servlet-link>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-link>
      </webservice-description>

      <servlet-link> is used to find an entry in web.xml. If it doesn't find any entry, spec says to use defaults to create <servlet> entry and url-pattern mapping. Copied the spec sections at the end of this report. For example, an impl looks for the following entry in web.xml:

      <servlet>
      <servlet-name>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-name>
      ...
      </servlet>

      299 tck test case has a problem with the <servlet-name>. It has "TestWebService" instead of org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint

      --------
      [5.3.2.1] and [5.3.2.2] sections of JSR 109

      For Servlet based endpoints using this annotation, fully qualified name of the Service Implementation Bean class
      must be used as the <servlet-link> element in the deployment descriptor to map the Port component to the actual
      Servlet.
      Following default mapping rules apply for Web modules that contain Servlet based endpoints that use this
      annotation but do not package a web.xml or a partial web.xml:
      • fully qualified name of the Service Implementation Bean class maps to <servlet-name> element in web.xml.
      • fully qualified name of the Service Implementation Bean class maps to <servlet-class> element in web.xml
      (also specified in section 7.1.2)
      • serviceName attribute of javax.jws.WebService annotation prefixed with "/" maps to <url-pattern> element
      in web.xml. If the serviceName attribute in javax.jws.WebService annotation is not specified, then
      the default value as specified in JSR-181 specification is used.

              rhn-engineering-jharting Jozef Hartinger
              jitu_jira Jitendra Kotamraju (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: