You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-auto@ws.apache.org by "Jimisola Laursen (JIRA)" <xm...@ws.apache.org> on 2006/11/11 17:17:39 UTC
[jira] Updated: (XMLRPC-124) Initalization bugs 1)
handleInitParameters always fails and 2) registerPublicMethods never adds
void methods
[ http://issues.apache.org/jira/browse/XMLRPC-124?page=all ]
Jimisola Laursen updated XMLRPC-124:
------------------------------------
Attachment: XMLRPC-124.diff
Fix for 1) and 2) in original issue description.
In addition to original issue description for 1) there was also a problem with
if (ReflectionUtil.setProperty(server, name, value)) {
throw new ServletException("Unknown init parameter " + name);
}
since ReflectionUtil.setProperty returns true if the property was set correctly.
Hence, it should be
if (!ReflectionUtil.setProperty(server.getConfig(), name, value)) {
throw new ServletException("Unknown init parameter " + name);
}
> Initalization bugs 1) handleInitParameters always fails and 2) registerPublicMethods never adds void methods
> ------------------------------------------------------------------------------------------------------------
>
> Key: XMLRPC-124
> URL: http://issues.apache.org/jira/browse/XMLRPC-124
> Project: XML-RPC
> Issue Type: Bug
> Components: Source
> Affects Versions: 3.1
> Reporter: Jimisola Laursen
> Attachments: XMLRPC-124.diff
>
>
> 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());
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira