Hi!
I submitted this example:
"
<?php
require_once("XML/RPC/Server.php");
ob_start();
function hello($args)
{
/ O método getValues() retorna um array com todos os
parâmetros passados à função, convertidos de
tipos XML RPC para tipos PHP com a
função XML_RPC_decode()/
$vals= $args->getValues();
/ nós simplesmente retornamos um XML_RPC_Values contendo o
resultado com o tipo 'string'/
$out="Hi {$vals[0]} !";
$val = new XML_RPC_Value($out, 'string');
return new XML_RPC_Response($val);
}
function add($args){
$vals=$args->getValues();
$out=$vals[0] + $vals[1];
$val = new XML_RPC_Value($out, 'double');
return new XML_RPC_Response($val);
}
$methods=array(
'hello' => array(
'function' => 'hello',
'signature' => array(
array(
$GLOBALS['XML_RPC_String'],
$GLOBALS['XML_RPC_String']
)
),
'docstring' => 'Greets you.'
),
'add' => array (
'function' => 'add',
'signature' => array(
array(
$GLOBALS['XML_RPC_Double'],
$GLOBALS['XML_RPC_Double'],
$GLOBALS['XML_RPC_Double']
)
),
'docstring' => 'Adds two numbers'
)
);
$server = new XML_RPC_Server($methods);
?>
"
and I had this result:
"
This XML file does not appear to have any style information associated with it. The document tree is shown below.
...
faultCode
105
...
faultString
XML error: Invalid document end at line 1
..
"
could someone help me to understand what is the problem?
thanks
francisco