XML-RPC

The ClientFactory always concatenates a "." before the method name.

Created: 15/Jun/09 06:47 AM   Updated: 18/Jun/09 07:16 AM
Return to search
Component/s: Source
Affects Version/s: 3.1.1
Fix Version/s: 3.1.3

Time Tracking:
Original Estimate: 0.5h
Original Estimate - 0.5h
Remaining Estimate: 0.5h
Remaining Estimate - 0.5h
Time Spent: Not Specified
Remaining Estimate - 0.5h

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ClientFactory.java 2009-06-18 06:40 AM Livnat Peer 6 kB

Resolution Date: 18/Jun/09 07:16 AM


 Description  « Hide
I want to invoke a remote method, who's name is without any prefix.
In the "newInstance" methods:
 1. The first 2 signatures add the class name as a prefix:
   public interface X{
      public void foo();
   }

    foo() invokes--> X.foo()
 2. The 3rd signature adds the string passed in pRemoteName as a prefix:
          invoking newInstance with pRemoteName="goo" invokes--> "goo.foo()"
                                           passing pRemoteName="" invokes --> ".foo()"



suggested patch:

In the class
   "ClientFactory.java"
In method
   "public Object newInstance(ClassLoader pClassLoader, final Class pClass,
 final String pRemoteName)"

 add a check if the pRemoteName is empty, if this is the case then no need to
 concatenate "." before the method name.

today - String methodName = pRemoteName + "." + pMethod.getName();

a fix - String methodName = pMethod.getName();
               if(pRemoteName.length()>0){
                   methodName = pRemoteName + "." + methodName;
               }


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.