5 Replies Latest reply on May 7, 2011 8:04 AM by mcdowell

    JBoss AS 6, JAX-WS service in WAR, no web.xml

    mcdowell Newbie

      I'm trying to determine whether this is a bug in JBoss AS 6 or if I'm missing something obvious. I've been searching the forum/wikis/doc/JIRA/JSRs for an answer to this, but haven't found one yet.

       

      I've developed a trivial web service using the following steps:

      1. Write a simple WSDL
      2. Use wsimport to generate bindings
      3. Write the Service Implementation annotated with @WebService (implementing the generated interface)
      4. Bundle as a WAR (no web.xml)
      5. Deploy to JBoss AS 6.0.0 Final

       

      On Glassfish 3, this is sufficient to run the web service; on JBoss, the service is not registered.

       

      If I add a web.xml and map the class as a servlet as described in the JBoss documentation, the service works as expected.

       

      However, this doesn't seem to meet the requirements of JSR-109:

      For Servlet based endpoints using this annotation (@WebService), 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 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.

       

      If I omit the web.xml, do I need to provide some other JBoss-specific deployment descriptor? Have I misunderstood the spec?