Re: Return Complex Types.

2010-04-26 Thread Stanislav Miklik
I can set debug on the response to see the raw method > response? > > Thanks. > > > > On 4/26/10 3:12 PM, Stanislav Miklik wrote: > >> Hi, >> >> since you don't get a class cast exception, everything seems to be working >> as it should be. >> in

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 be

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 li

Re: How to write XML-RPC web service? (Second Posting)

2009-09-28 Thread Stanislav Miklik
I think good entry point can be example here: http://ws.apache.org/xmlrpc/server.html Regards Stano On Mon, Sep 28, 2009 at 15:21, Mustafa Cayci wrote: > Hello, > > I have not gotten any response. Trying again > > Mustafa > > > > - Original Mess

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 "s

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 *setHandlerMapping

Re: XMLRPC giving issues while sending the entire xml as string parameter

2009-03-04 Thread Stanislav Miklik
Hi, general remark: if you really want to see what is transmitted between client and server, you can always use eg. wireshark to capture the TCP stream. But more concrete: your two solutions are totally different: 1) plain java. you just copy your xml to the socket. And your XML is not valid XML

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 XmlRp

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. http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/server/XmlRpcSer

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 O

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

2008-04-14 Thread Stanislav Miklik
PM, Jochen Wiedmann <[EMAIL PROTECTED]> wrote: > On Mon, Apr 14, 2008 at 12:40 PM, Stanislav Miklik > <[EMAIL PROTECTED]> wrote: > > > return value (Jochen probably knows that always Object[], but since it > is > > not described...) > > That's no

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 arra

Re: Are there any examples of clients loading parameters for structs or arrays?

2008-04-02 Thread Stanislav Miklik
Hi, to see which xml-rpc types are maped to which java objects in apache xml-rpc, see http://ws.apache.org/xmlrpc/types.html And with the array (as a return parameter) , there is small problem that you don't know exactly what is returned, also here you can see an example how to handle that in ge

Re: XML-RPC and casting the correct type

2008-01-14 Thread Stanislav Miklik
Hi, see my comments bellow. Regards Stano On 1/14/08, AbelMacAdam <[EMAIL PROTECTED]> wrote: > > > Hi, > > How do you know what the correct cast type is for the return of a request? # You have to know the interface. And then you can expect the correct types also returned by xml rpc. If if you

Re: NEWBIE: deserializing xml-rpc response not knowing returned data type

2007-08-27 Thread Stanislav Miklik
Hi, I already write something like that... it was for xml-rpc 2.x.y, but maybe it can help... import java.lang.reflect.Array; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.ut

Re: XmlRpcClient persistent connections

2007-06-29 Thread Stanislav Miklik
AIL PROTECTED]> wrote: hmm tnx! can u point me to which part i should use or manipulate even if your using the old version? so that at least i will have an idea . thanks again :) - Original Message - From: "Stanislav Miklik" <[EMAIL PROTECTED]> To: Sent: Friday, June 29

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 the

Re: Bug in xml-rpc rc1

2006-08-02 Thread Stanislav Miklik
On 8/2/06, Jochen Wiedmann <[EMAIL PROTECTED]> wrote: Following your description, I have written the small test program below. It works fine for me. Jochen As I write before, the server was set to enabled for keapalive. I rewrite little bit your test to more match my case. And it hasn't st

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 cours

Re: Bug in xmlrpc-3.0b1

2006-08-01 Thread Stanislav Miklik
try* { Thread.sleep(l); } *catch* (InterruptedException ex) { } } Pls, can you describe me how will end this for(;;) cycle? Shouldn't ne there something like if(l>0){ //wait } else break; Bye Stano On 8/1/06, Jochen Wiedmann <[EMAIL PROTECTED]> wrote: Stani

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* setupServerSoc