RPC With A Dynamic Number of Variables

2008-07-15 Thread Elam Daly
Hi All, We have a client who is expecting us to create an XML-RPC service with a dynamic number of variables, ie myRPC(var_1,var_2, var_x); Considering the static nature of the ws-xmlrpc library, I don't see how I can achieve this without using a Filter or something similar. Any suggestions are

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Jochen Wiedmann
On Tue, Jul 15, 2008 at 3:51 PM, Elam Daly [EMAIL PROTECTED] wrote: We have a client who is expecting us to create an XML-RPC service with a dynamic number of variables, ie myRPC(var_1,var_2, var_x); Considering the static nature of the ws-xmlrpc library, I don't see how I can achieve this

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Elam Daly
I agree Jochen, but this is the client's already implemented specification and I don't have control over changing it at this point. Browsing the archives, it seems that a Filter is not the best choice to correct this though. - Elam On Tue, Jul 15, 2008 at 11:11 AM, Jochen Wiedmann [EMAIL

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Stanislav Miklik
Hi, If I have understood it correctly, there is no problem with such methods. Here is example from the site: Object[] params = new Object[]{new Integer(33), new Integer(9)}; Integer result = (Integer) client.execute(Calculator.add, params); Also execute method takes parameters in the

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Elam Daly
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

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Craig Kelley
Hi Elam, I'm not certain about XMLRPC 3.x, but with 1.x you could override the execute() method for XmlRpcHandler and do this sort of thing. We use it along with introspection to route calls to various places. -Craig On Tue, Jul 15, 2008 at 9:39 AM, Elam Daly [EMAIL PROTECTED] wrote: Jochen,

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Stanislav Miklik
Hi *, sorry, I read it to quickly (I assumed that server is fixed, not the client) ;-) As Craig said, there is a solution with making your own handler and then from XmlRpcRequest you can get any number of parameters. Check eg.

Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Elam Daly
Thanks for the replies. I don't suppose I could get a small bit of direction here? My original setup is exactly like the calculator demo. Am I now to change my class to extend the XmlRpcServlet class and implement a custom XmlRpcHandler, similar to the documentation example of Basic