Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5716

In the admin console the seiMethodHeaderParameter service parameter should not be modifiable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.2
    • 1.7.3
    • admin console
    • None

    Description

      In the admin console, some services are automatically tagged with the seiMethodHeaderParameter service parameter.
      This parameter takes an array as value instead of a String.
      Because it appears in the parameters in the console, changing any other parameter for the service will also send a value to this seiMethodHeaderParameter parameter. This issue is that the admin console sends all parameter values as String and therefore the seiMethodHeaderParameter now contains a String value instead of an array.

      This will result in an exception of the service at runtime with a ClassCastException cannot cast a String into an array.

      See such an exception below:

      [ERROR] java.lang.String cannot be cast to java.util.ArrayList
      java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList
      	at org.apache.axis2.jaxws.dispatchers.MustUnderstandUtils.getHeaderParamaterList(MustUnderstandUtils.java:105)
      	at org.apache.axis2.jaxws.dispatchers.MustUnderstandUtils.markUnderstoodHeaderParameters(MustUnderstandUtils.java:64)
      	at org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker.doInvoke(MustUnderstandChecker.java:49)
      	at org.apache.axis2.handlers.AbstractTemplatedHandler.invoke(AbstractTemplatedHandler.java:44)
      	at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
      	at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
      	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
      	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
      	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
      	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
      

      Looking at the code of MustUnderstandUtils, we see indeed that it tries to retrieve the value of the seiMethodHeaderParameter service parameter as in:

      ArrayList seiMethodHeaders = (ArrayList)axisService.getParameterValue("seiMethodHeaderParameter");
      

      And this generates the exception because we changed (another) service parameter but the admin console updated also seiMethodHeaderParameter with a string value.

      Attachments

        1. Axis2____Administration_Page-seiMethodHeaderParameter.jpg
          261 kB
          Olivier Vanekem
        2. Console-after-patching-code.jpg
          266 kB
          Olivier Vanekem
        3. ServiceParaEdit.jsp
          5 kB
          Olivier Vanekem

        Activity

          People

            veithen Andreas Veithen
            ovanekem Olivier Vanekem
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: