Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-544

Handlers that (return false in handlerequest) throw IndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-ws4ee-4.0.4RC1
    • jboss-ws4ee-4.0.2, jboss-ws4ee-4.0.3
    • jbossws-native
    • None
    • Env - Tested on JBoss4.0.2 and 4.0.3RC1

      It appears that if my handler returns false, then all subsequent calls to the endpoint fail with index out of bounds issues. When the request handler first returns false I get the following in the log :

      14:36:24,203 WARN [InvokerProviderJSE] FIXME: handlerChain.handleRequest() returned false

      Subsequent calls then fail in the response call with :

      14:36:33,953 ERROR [HandlerChainBaseImpl] RuntimeException in response handler
      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      at java.util.ArrayList.get(ArrayList.java:322)
      at org.jboss.webservice.handler.HandlerChainBaseImpl.handleResponse(HandlerChainBaseImpl.java:277)
      at org.jboss.webservice.handler.ServerHandlerChain.handleResponse(ServerHandlerChain.java:83)
      at org.jboss.webservice.server.InvokerProviderJSE.invokeTarget(InvokerProviderJSE.java:117)
      at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
      at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)

      at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:200)
      at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)

      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:905)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.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:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      .........
      14:36:33,953 ERROR [InvokerProviderJSE] Error processing response handler chain
      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

      To simplify the test I wrote a handler that extends Generic Handler as follows :
      =======================================================================================
      static int count=0;

      /**

      • (non-Javadoc)
      • @see javax.xml.rpc.handler.GenericHandler#handleRequest(javax.xml.rpc.handler.MessageContext)

      */
      public boolean handleRequest(MessageContext msgCtx)

      { count++; if (count==2) return false; else return true; }

      public boolean handleResponse(MessageContext msgCtx)

      { return true; }

      The first call works, second fails, and then any further calls fail with the above stack trace.
      ================================================================================

              tdiesler@redhat.com Thomas Diesler
              anil.saldhana Anil Saldanha (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: