473,761 Members | 10,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about xmlrpc server: returning a list of lists to a Java client?

I have a simple xmlrpc server/client written in Python, and the client
throws a list of lists to the server and gets back a list of lists.
This runs without a problem.

I then wrote a simple Java xmlrpc client and it calls the python
server. But I can't figure out what type to cast the result (of type
Object) to. The Java xmlrpc call is basically this:
Object result = client.execute( "MyFunction ", params);
And I tried to replace that line with

Vector result = (Vector) client.execute( "MyFunction ", params);

and

ArrayList result = (ArrayList) client.execute( "MyFunction ", params);

and both gave me java.lang.Class CastException.

I'm really not a Java expert - anyone can give a hint or two?

(NOTE the java client/python server works well when the returning
result is of type string - so this rules out some other possible
problems)

Thanks a lot!

Oct 23 '06 #1
1 2385

fortepianissimo wrote:
I have a simple xmlrpc server/client written in Python, and the client
throws a list of lists to the server and gets back a list of lists.
This runs without a problem.

I then wrote a simple Java xmlrpc client and it calls the python
server. But I can't figure out what type to cast the result (of type
Object) to. The Java xmlrpc call is basically this:
Object result = client.execute( "MyFunction ", params);
And I tried to replace that line with

Vector result = (Vector) client.execute( "MyFunction ", params);

and

ArrayList result = (ArrayList) client.execute( "MyFunction ", params);

and both gave me java.lang.Class CastException.

I'm really not a Java expert - anyone can give a hint or two?

(NOTE the java client/python server works well when the returning
result is of type string - so this rules out some other possible
problems)

Thanks a lot!
Ok I'll answer to myself: found this message

http://mail-archives.apache.org/mod_...ilson.co.uk%3E

Basically it's introduced by a bug in Apache XMLRPC 3.0a1
implementation.

Anyone knows any update on this please do post up (the message was
dated in March 2006) - appreciate it!

Oct 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1906
by: Jason Kratz | last post by:
After figuring out the other day (thanks to everyone here who helped) how to get the dir lists I want on my unix machine I want to turn the same thing into an XML-RPC service. Using Simple XMLRPCServer.py I created my own version by adding my getdirs function and then I call the code to open the server: import os import os.path import SimpleXMLRPCServer import xmlrpclib
0
1738
by: Juan Carlos CORUÑA | last post by:
Hello all, I'm trying to create a COM Server with an embedded xmlrpc server. Here is way it must work: - The client application (programmed with a COM capable language) instantiates my COM server (programmed with python). - The COM server must have a connect interface in order to let the client application process the xmlrpc request. - After executing a "serveforever" method on the COM server it begins
0
1177
by: elbertlev | last post by:
Hi! I'm trying to use py-xmlrpc. All works fine (and very fast) in one-threaded case, but I really have to serve many clients. As advertised, py-xmlrpc supports non-blocking calls (via select). When request is received the handler is called with proper parameters. As I understood from reading the source, if rpc call can't be executed immediately (or takes long time) respond can be postponed by raising postpone exception and when...
1
2798
by: Joxean Koret | last post by:
Hi to all! I'm having troubles to make my XMLRPC application working with non ASCII characters. Example: 1.- In one terminal run the following script: -----------XMLRPC Server-------------
3
5857
by: David Hirschfield | last post by:
An xmlrpc client/server app I'm writing used to be super-simple, but now threading has gotten into the mix. On the server side, threads are used to process requests from a queue as they come in. On the client side, threads are used to wait on the results of requests to the server. So the question is: how thread-safe is python xmlrpc? If the client makes a request of the server by calling:
0
2196
by: Eric | last post by:
Hello I wan't to use a client PHP XMLRPC with my Java server XMLRPC. For simple type, all works fine. But for type like array, my server java lose my parameters ! How can I know if it comes from my PHP client or my Java server ? here is my code
3
2420
by: OpenPavilion | last post by:
Hello community, maybe one of you can help me out with a question regarding the transfer of objects betwen client an server: I have three files: ####### ClassA.py ####### class ClassA: def setA(self, newA): self.a = newA
10
1506
by: bruce | last post by:
hi... can someone point me to where/how i would go about calling a ruby app from a python app, and having the python app being able to get a returned value from the ruby script. something like test.py a = os.exec(testruby.rb)
4
3940
by: care02 | last post by:
I have implemented a simple Python XMLRPC server and need to call it from a C/C++ client. What is the simplest way to do this? I need to pass numerical arrays from C/C++ to Python. Yours, Carl
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.