Dang Quoc Hien created XMLRPC-192:
-------------------------------------
Summary: bug
org.apache.xmlrpc.common.TypeConverterFactoryImpl.java
Key: XMLRPC-192
URL: https://issues.apache.org/jira/browse/XMLRPC-192
Project: XML-RPC
Issue Type: Bug
Components: Source
Affects Versions: 3.1.4
Environment: Windows 7
Reporter: Dang Quoc Hien
I found a bug in the code of TypeConverterFactoryImpl.java when trying to
create a method at server side, which accepts parameter with type Object (
public void myMethod(Object o)). that means myMethod should accept any type of
parameter.But the server will procedure an exception everytime the client call
this method with Boolean paramenter.
SEVERE: No method matching arguments: java.lang.Boolean
org.apache.xmlrpc.XmlRpcException: No method matching arguments:
java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean
at
org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:110)
at
org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46)
at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
at
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
I also found where the problem is, and how to handle it:
In the function public TypeConverter getTypeConverter(Class pClass):
All the if-conditions like pClass.isAssignableFrom(xxx.class) should be used
the otherway around : if(xxx.class.isAssignableFrom(pClass))...
and also a TypeConverter for Object.class should be added to this class
I have fixed this problem with my own implementation for
TypeConverterFactoryImpl. if you want, I could provide the code.
best regards
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]