8 Replies Latest reply on Feb 6, 2005 8:54 PM by Joseph Miller

    port-component-uri limited to single directory web context?

    Steven Wisener Newbie

      In JBoss 3, my web services were deployed in a subdirectory under a web context, e.g.

      http://myserver/mycontext/services/MyWebService

      In Jboss 4, however, I am unable to specify

      /mycontext/services/MyWebService

      as the port-component-uri. Attempting it causes an IllegalArgumentException.

      /mycontext/MyWebService

      works, however. Is this a bug, or will adding a directory to the web context never be supported?

        • 2. Re: port-component-uri limited to single directory web conte
          Steven Wisener Newbie

           

          java.lang.IllegalAccessException: /mycontext/services/MyWebService
           at org.jboss.webservice.server.ServiceEndpointServlet.assertServiceAccess(ServiceEndpointServlet.java:69)
           at org.jboss.webservice.server.ServiceEndpointServlet.doGet(ServiceEndpointServlet.java:93)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
           at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
           at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
           at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
           at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
           at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
           at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
           at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
           at java.lang.Thread.run(Thread.java:534)
          


          • 3. Re: port-component-uri limited to single directory web conte
            Alexander Goncharuk Newbie

             

            "thomas.diesler@jboss.com" wrote:
            Show me stack trace.

            one more confirmation of that problem.

            JBOSS LOG.
            23:02:16,991 INFO [AxisService] Web Service deployed: http://host:8080/AAA/BBB/WebService


            jboss.xml:
            <port-component-uri>/AAA/BBB/WebService</port-component-uri>


            invoked: http://host:8080/AAA/BBB/WebService?wsdl

            and ...


            23:03:29,241 INFO [AxisServlet] Exception:
            java.lang.IllegalAccessException: /AAA/BBB/WebService
            at org.jboss.webservice.server.ServiceEndpointServlet.assertServiceAccess(ServiceEndpointServlet.java:69)
            at org.jboss.webservice.server.ServiceEndpointServlet.doGet(ServiceEndpointServlet.java:93)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
            at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Thread.java:534)

            • 5. Re: port-component-uri limited to single directory web conte
              Alexander Goncharuk Newbie

               

              "sasgon" wrote:
              in the case of /AAA/WebService it works!


              actually, I think I see why it doesn't work in my case ...

              /** Denies access to the generic Axis way of accessing services
               *
               * /context-root/services/ServiceName
               *
               * J2EE web services are deployed within their own context-root that may have authentication
               * requirements.
               */
               private boolean assertServiceAccess(HttpServletRequest req, HttpServletResponse res)
               throws IOException
               {
               String contextPath = req.getContextPath();
               String requestURI = req.getRequestURI();
               String pathInfo = req.getPathInfo();
              
               if (requestURI.startsWith(contextPath + "/services/") && "/Version".equals(pathInfo) == false)
               {
               reportTrouble(new IllegalAccessException(requestURI), res, res.getWriter());
               return false;
               }
              
               return true;
               }


              How can I emulate old style deployment if I need to do that ?

              I would like to have deployment /xxxx/services/MyServices!

              Please, any suggestions ?

              Thank You.





              • 8. Re: port-component-uri limited to single directory web conte
                Joseph Miller Newbie

                I just want to add a "me too" it was working as expcted in 4.0.0, but it breaks when using /services/* in 4.0.1