You are here: How to send array from a XMLRPC PHP Client to a XMLRPC Java server « PHP Programming Language « IT news, forums, messages
How to send array from a XMLRPC PHP Client to a XMLRPC Java server

Posted by Eric on 03/21/06 17:38

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,$server_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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация