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

bug org.apache.xmlrpc.common.TypeConverterFactoryImpl.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.4
    • None
    • Source
    • Windows 7

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            hiendq Dang Quoc Hien
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified