6 Replies Latest reply on Oct 12, 2011 7:58 AM by nbhatia

    Why is servlet mapping needed to deploy a web service?

    nbhatia

      I was trying to deploy the following web service on AS 7.0.2:

       

      @WebService(targetNamespace = "http://archfirst.org/bfexch/marketdataservice.wsdl", serviceName = "MarketDataService")

      public class MarketDataWebService {

          ...

      }

       

      This by itself was not working. I had to add the servlet mapping shown below to make it work (based on a suggestion in this article):

       

      <servlet>

          <servlet-name>MarketDataService</servlet-name>

          <servlet-class>org.archfirst.bfexch.webservice.marketdata.MarketDataWebService</servlet-class>

      </servlet>

      <servlet-mapping>

          <servlet-name>MarketDataService</servlet-name>

          <url-pattern>/MarketDataService/*</url-pattern>

      </servlet-mapping>

       

      1. Where is this documented? Is it specific to Apache CXF? I did not have to do this when deploying the same service on GlassFish. Perhaps Metro does not need it?
      2. Does AS 7 support multiple implementations of JAX-WS? The JBoss WS page suggests that there are 3 implementations, but it is not clear which one AS 7 uses.

       

      Thanks.

      Naresh