return an array

<[email protected]> Fri, 5 Dec 2008 00:27:46 +0100
Newsgroups gmane.comp.php.xml-rpc
Message-ID <[email protected]>
Hi all,


I have the following simple code:

<?
include ("lib/xmlrpc.inc");
include ("lib/xmlrpcs.inc");
include ("lib/xmlrpc_wrappers.inc");

$userInfo = new xmlrpcval ( array(
		"dgeheniau", new xmlrpcval (
			array(
				"lastname", new xmlrpcval ("Geheniau",
"string"),
				"firstname", new xmlrpcval ("Didier",
"string"),
				"email", new xmlrpcval ("[email protected]",
"string")
			),
			"struct")
	), "struct");

$getUserInfo_sig = array(array($xmlrpcStruct, $xmlrpcString));
$getUserInfo_doc = "This function will return all know user info!";

function getUserInfo ($userName){
	global $userInfo;
	return new xmlrpcresp(new
xmlrpcval($userInfo->structmem("$userName"), "struct"));

}

#$o=new xmlrpc_server_methods_container;
$a=array(
	"user.getUserInfo" => array(
		"function" => "getUserInfo",
		"signature" => $getUserInfo_sig,
		"docstring" => $getUserInfo_doc
	)
);

$s=new xmlrpc_server($a, false);
$s->setdebug(3);
$s->compress_response = true;
$s->service();
?>

In the client I get:

+++PROCESSING ERRORS AND WARNINGS+++
Object of class xmlrpcmsg could not be converted to string
Undefined index:  
+++END+++

What am I doing wrong?

Regards,

Didier