Re: Return Complex Types.

2010-04-26 Thread Stanislav Miklik
Hi, since you don't get a class cast exception, everything seems to be working as it should be. in your print you probably get something like [Ljava.lang.Object;@1100d7a but this means that you have array of Objects Thus you can access the first person as people[0]. The corresponding type will

Re: Design question

2010-02-03 Thread Stanislav Miklik
Hi, I am not so familiar with the implementation of web server, but maybe I have one general hint. You may have consider using singleton pattern, i.e. class that implements XML-RPC methods will forward requests to the singleton that can access directly your initialized objects (also non-static).

Re: class cast exception with array return result

2009-10-13 Thread Stanislav Miklik
Hi, you are right, there is a bug in FAQ. the point is, that you can not cast the result of the XML RPC call, in your case return (String []) windows.getInstances(category); is the problem. You have to transform the result to String[] as described in the FAQ (but without the cast in the first

Re: XmlRpcHttpTransportException (apache xmlrpc client, xmlrpc-c C++ server)

2009-07-12 Thread Stanislav Miklik
Hi, I am not sure, but to me it looks like the problem on HTTP level (guess 404). Also I would try to capture the good case (with C++ client) and the bad case (Java) with Wireshark / snoop and compare the HTTP request. However it looks strange, but I would guess some different interpretation of

Re: Passing an array of strings

2009-07-08 Thread Stanislav Miklik
Hi, AFAIK, you are right, option A is the way how it works (see: http://ws.apache.org/xmlrpc/faq.html#arrays) My only advice, make small tooling, eg. public static List decodeList(Object element) { if (element == null) { return null; } if (element instanceof List) {

Re: Renaming XML RPC functions

2009-04-23 Thread Stanislav Miklik
Hi, it is also possible to change on server side (if you want). You can define your own request handling where you can implement mapping between xml rpc calls and your code as you want. But maybe it would be easier to change the client ;-) see api: XmlRpcServer : public void

Re: Multiple xmlrpc calls over single connection

2009-01-14 Thread Stanislav Miklik
yes, I have similar experiences with xmlrpc-2.x with using XmlRpcLiteClient. This client for every request creates new transport class, ie. new connection was created every time. Therefore I have to create my new implementation : public class LiteClient extends XmlRpcClientLite { private

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 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: hi...problem with xml rpc java and tomcat

2008-04-14 Thread Stanislav Miklik
Hi *, generic types are not problem for XML RPC since collection are not generic at runtime (ie. this is only compile time check, however some compile time warning you will get). Normally you have no problem to cast return values as they are mapped as described in API docs. But with XML RPC

[PATCH] Faq: ClassCastException

2008-04-14 Thread Stanislav Miklik
Hi Jochen, here is my first patch ;-) I think the cast in the faq would cause ClassCastException and should be omitted. Regards Stano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: XmlRpcClient persistent connections

2007-06-29 Thread Stanislav Miklik
Hi, I think you can manage createTransport of the client always to return transport that will keep only one connection. I am using something like that but I am using the old (2.xxx) version of XML RPC and LiteTransport with keep-alive, but I assume that something like that is possible also in

Bug in xml-rpc rc1

2006-08-02 Thread Stanislav Miklik
Hello, I have probably found a bug in WebServer.shutdown(). This call has frozen, but I don't know why. Conditions that might affecting this: 1. I started the server with enabled extensions and enabled keepalive (others default, if not mentioned) 2. In the same program (in another thread of

Bug in xmlrpc-3.0b1

2006-07-31 Thread Stanislav Miklik
Hello, I think I found bug in xmlrpc-3.0b1. Maybe it is corrected now, but also in rc1 it was the same. I can't find the way to report this bug, also I write email to you. Bug - more correctly: class: org.apache.xmlrpc.webserver.WebServer method * private **synchronized* *void*