473,385 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to send array from a XMLRPC PHP Client to a XMLRPC Java server

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

---------------
Client :
$myArray = new xmlrpcval(
array(
1 => new xmlrpcval("Tom"),
3 => new xmlrpcval("Dick"),
5 => new xmlrpcval("Harry")
),
"array");
executerRequeteHTTP("testVector",$myArray);

function executerRequeteHTTP($nomMethode,$args) {
include("./config.php");
// construction du client
$client=new xmlrpc_client($server_path,$server_hostname,$serve r_port);
$message=new xmlrpcmsg($nomMethode,$args);
$result=$client->send($message,0,'http');
if (!$result->faultCode()) {
$result=$result->value();
$tab=xmlrpc_decode($result);
}
else {
fatalError($result);
}
return $tab;
}

---------------
Server :
public void testVector(Vector vec) {
System.out.println("testVector(vec)");
System.out.println("vec : "+vec);
}

public String testVector() {
System.out.println("testVector()");
return "OK";
}
---------------
testVector() is always executed and I don't know why ...

Could you help me ?

thanks,
BOYER Eric

Mar 21 '06 #1
0 2169

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

Similar topics

0
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...
1
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...
1
by: emielvl | last post by:
Hello, I'm developing a client/server architecture based on the XML-RPC implementation in php4. All works pretty well, except that in the response from the server there is no "Content-Length" in...
3
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....
7
by: Laszlo Nagy | last post by:
Hello, I'm trying to create a simple XMLRPC server and a client. It is a small application, but the connection needs to be secure. I would like the client to be as thin as possible. Ideally, the...
1
by: fortepianissimo | last post by:
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...
1
by: tmugavero | last post by:
Hello All, I have a question that has been giving me a bit of trouble. Has anyone been able to connect to C# from non .net C++ via XmlRpc? I have been using the CookComputing XmlRpc Library...
1
by: tmugavero | last post by:
Hello All, I have a question that has been giving me a bit of trouble. Has anyone been able to connect to C# from non .net C++ via XmlRpc? I have been using the CookComputing XmlRpc Library...
4
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.