Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-124

Initalization bugs 1) handleInitParameters always fails and 2) registerPublicMethods never adds void methods

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Source
    • Labels:
      None

      Description

      1)

      A bug was inserted when the patch for XMLRPC-116 was changed/refactored slightly.

      In handleInitParameters you call ReflectionUtil.setProperty(server, name, value) where server is an XmlRpcServletServer . This class does not have any setters for init parameters such as "enabledForExtensions" or "contentLengthOptional", so reflection fails. I believe that methods on XmlRpcServerConfig are reflection should be used on (this is what I did in my patch) and therefore

      ReflectionUtil.setProperty(server, name, value)

      should change to

      ReflectionUtil.setProperty(server.getConfig(), name, value).

      2)

      The latter issue was due to voidMethodEnabled not being set (here: to true) using isEnabledForExtension prior to public method being registered and therefore
      XmlRpcServlet.newPropertyHandlerMapping:~180

      should change to

      mapping.setVoidMethodEnabled(server.getConfig().isEnabledForExtensions());
      mapping.load(Thread.currentThread().getContextClassLoader(), url);

      from

      mapping.load(Thread.currentThread().getContextClassLoader(), url);
      mapping.setVoidMethodEnabled(server.getConfig().isEnabledForExtensions());

        Attachments

        1. XMLRPC-124.diff
          1 kB
          Jimisola Laursen

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jimisola Jimisola Laursen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: