Jochen,

just so I'm clear, are you suggesting to change my current method signature
from myRPC(var_1, var_2, var_x) to myRPC(Object[] obja) and then parse the
array and forward to the appropriate method?

Stano,

The client is using PHP and when they try and execute my RPC, they get an
error claiming the method doesn't exist because there isn't one matching the
method signature that they are trying to use.

If I call the calculator RPC with Object[] params = new Object[]{new
Integer(33), new Integer(9), new Integer(10)};. afaik that won't work
because the add method is only expecting 2 parameters, not 3.

- Elam

On Tue, Jul 15, 2008 at 11:22 AM, Jochen Wiedmann <[EMAIL PROTECTED]>
wrote:

> On Tue, Jul 15, 2008 at 5:13 PM, Elam Daly <[EMAIL PROTECTED]> wrote:
>
> > I agree Jochen, but this is the client's already implemented
> specification
> > and I don't have control over changing it at this point.
>
> Sure you don't? Note that Java varargs methods are actually using
> object arrays internally.
>
>
> > Browsing the archives, it seems that a Filter is not the best choice to
> > correct this though.
>
> Ok, I would do this by using a wrapper. For example, on the server
> side, I'd have a method that takes an object array, chooses the actual
> method by looking at the array elements and delegates the call to the
> actual method, possibly by using reflection.
>
> On the client side, you could provide a Java varargs method that takes
> the object array as an input and calls the wrapper.
>
>
> Jochen
>
>
> --
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
>
>  -- (Terry Pratchett, Thief of Time)
>

Reply via email to