Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-11056

JAX-WS servlet with multiple url-pattern elements fails when using CXF: "Cannot obtain destination"

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: EAP_EWP 5.2.0
    • Fix Version/s: TBD EAP 5
    • Component/s: Web Services
    • Labels:
      None
    • Workaround Description:
      Hide

      Create two <servlet> elements in your web.xml, and use the same <servlet-class> in each. You can then use a different <url-pattern> in each servlet definition:

      <servlet>
        <servlet-name>SampleWS</servlet-name>
        <servlet-class>com.sample.ws.SampleWSImpl</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>SampleWS</servlet-name>
        <url-pattern>/b/c/myservice</url-pattern>
      </servlet-mapping>
      <servlet>
        <servlet-name>SampleWS1</servlet-name>
        <servlet-class>com.sample.ws.SampleWSImpl</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>SampleWS1</servlet-name>
        <url-pattern>/a/b/c/myservice</url-pattern>
      </servlet-mapping>
      
      Show
      Create two <servlet> elements in your web.xml, and use the same <servlet-class> in each. You can then use a different <url-pattern> in each servlet definition: <servlet> <servlet-name> SampleWS </servlet-name> <servlet-class> com.sample.ws.SampleWSImpl </servlet-class> </servlet> <servlet-mapping> <servlet-name> SampleWS </servlet-name> <url-pattern> /b/c/myservice </url-pattern> </servlet-mapping> <servlet> <servlet-name> SampleWS1 </servlet-name> <servlet-class> com.sample.ws.SampleWSImpl </servlet-class> </servlet> <servlet-mapping> <servlet-name> SampleWS1 </servlet-name> <url-pattern> /a/b/c/myservice </url-pattern> </servlet-mapping>
    • Release Notes Docs Status:
      Not Yet Documented
    • Docs QE Status:
      NEW

      Description

      I have the following servlet defined in my web.xml:

      <servlet>
          <servlet-name>SampleWS</servlet-name>
          <servlet-class>com.sample.ws.SampleWSImpl</servlet-class>
      </servlet>
      <servlet-mapping>
          <servlet-name>SampleWS</servlet-name>
          <url-pattern>/a/b/c/myservice</url-pattern>
          <url-pattern>/b/c/myservice</url-pattern>
      </servlet-mapping>
      

      The first URL mapping works as expected. However the second URL mapping results in an HTTP STATUS 500 error with the following stack trace:

      javax.servlet.ServletException: Cannot obtain destination for: /b/c/myservice
          org.jboss.wsf.stack.cxf.ServletControllerExt.findDestination(ServletControllerExt.java:114)
          org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:168)
          org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)
          org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:185)
          org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
          org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
          org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                asoldano Alessio Soldano
                Reporter:
                klape Kyle Lape
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: