XML-RPC

XmlRpcServlet.init(...) should support init params using reflection and not only hardcoded support for the init param "enabledForExtensions"

Created: 20/Sep/06 05:29 PM   Updated: 28/Nov/08 08:53 PM
Return to search
Component/s: None
Affects Version/s: 3.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works test.zip 2006-09-21 11:16 PM Jimisola Laursen 10 kB
File Licensed for inclusion in ASF works XMLRPC-116.diff 2006-10-06 11:21 AM Jimisola Laursen 11 kB
File Licensed for inclusion in ASF works XMLRPC-116.diff 2006-10-06 11:08 AM Jimisola Laursen 10 kB
File Licensed for inclusion in ASF works XMLRPC-116.diff 2006-09-21 11:14 PM Jimisola Laursen 15 kB

Resolution Date: 06/Oct/06 07:57 PM


 Description  « Hide
XmlRpcServlet currently doesn't support any other init param other than "enabledForExtension" which means that people will have to subclass XmlRpcServlet if they want to set e.g. contentLengthOptional.

After a discussion in xmlrpc-dev the following solution was decided upon:

1. iterate over ServletConfig.getInitParameterNames
2. foreach init param name check if there is a corresponding setter method (setter can only have one argument)
3. convert init param value to the data type that the setters argument has


Q: In step 3) what data types should be supported? byte, short, int, long, float, double and String?
A: Should simply reuse code from the ReflectionUtils. (Don't remember the class name right now, but there is existing functionality, which is used by the AbstractReflectiveXmlRpcHandlerMapping.

Q: What exception should be thrown (ServletException?) if no matching method can be found in step 2) or data type conversion fails in step 3)?
A: A ServletException mapping the actual exception (for example
IllegalArgumentException).




 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #453748 Fri Oct 06 19:57:44 UTC 2006 jochen Atomic properties of XmlRpcServer are now configurable as init parameters
in the XmlRpcServlet.
PR: XMLRPC-116
Submitted-by: Jimisola Laursen, lists@jimisola.com
Files Changed
MODIFY /webservices/xmlrpc/trunk/src/changes/changes.xml
ADD /webservices/xmlrpc/trunk/common/src/main/java/org/apache/xmlrpc/util/ReflectionUtil.java
MODIFY /webservices/xmlrpc/trunk/server/src/main/java/org/apache/xmlrpc/webserver/XmlRpcServlet.java

Repository Revision Date User Message
ASF #473827 Sat Nov 11 22:51:36 UTC 2006 jochen The configuration framework, as introduced by XMLRPC-116, was applicable
to the configuration only, and not to the XmlRpcServlet, or the
XmlRpcServletServer.
PR: XMLRPC-124
Submitted-by: Jimisola Laursen, lists@jimisola.com
Files Changed
MODIFY /webservices/xmlrpc/trunk/src/changes/changes.xml
MODIFY /webservices/xmlrpc/trunk/server/src/main/java/org/apache/xmlrpc/webserver/XmlRpcServlet.java
MODIFY /webservices/xmlrpc/trunk/.classpath