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
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).
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
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
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) {
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
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
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
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.
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
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]
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
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
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*
14 matches
Mail list logo