[phpxmlrpc] Invalid payload...

Gaetano Giunta giunta.gaetano at sea-aeroportimilano.it
Thu Nov 10 10:03:50 GMT 2005


Sorry, but this mailing list is dedicated to the php-xmlrpc library, which is apparently not the one you are using.
The home page for php-xmlrpc is phphxmlrpc.sourceforge.net.
You are using the PEAR xml-rpc library, which can be found on pear.php.net
The two libraries share a common code ancenstry, but have progressively diverged over time, so there is little chance for me to help in debugging problems with the pear version.

Bye
Gaetano Giunta

> -----Original Message-----
> From: phpxmlrpc-bounces at lists.usefulinc.com
> [mailto:phpxmlrpc-bounces at lists.usefulinc.com]On Behalf Of Vincent
> DELERUE (NETASQ)
> Sent: Wednesday, November 09, 2005 4:44 PM
> To: phpxmlrpc at lists.usefulinc.com
> Subject: [phpxmlrpc] Invalid payload...
> 
> 
> Hi,
> 
> I've a good response xml but xml_rpc can't parse it and give 
> me :"Fault
> Code: 2 Fault Reason: Invalid return payload: enable debugging to
> examine incoming payload"
> 
> on two others server it works but not my production server
> 
> have you any suggestion ?
> 
> on FreeBSD, install by ports :
> php4.4.1
> php4-xmlrpc-4.4.1_1
> pear-XML_RPC-1.4.3
> pear-PEAR-1.3.5_1
> 
> Thanks
> Vincent
> 
> Server side :
> function returnTest($params) {
> $param = $params->getParam(0);
> 
> // This error checking syntax was added in Release 1.3.0
> if (!XML_RPC_Value::isValue($param)) {
> return $param;
> }
> 
> $val = new XML_RPC_Value($param->scalarval(), 'string');
> return new XML_RPC_Response($val);
> }
> 
> 
> 
> Client side :
> $params = array(new XML_RPC_Value("10", 'int'));
> $msg = new XML_RPC_Message('test', $params);
> 
> $cli = new XML_RPC_Client('/xmlrpc.php', "monserver");
> $cli->setDebug(1);
> 
> 
> $resp = $cli->send($msg);
> 
> if (!$resp) {
> echo 'Communication error: ' . $cli->errstr;
> exit;
> }
> 
> if (!$resp->faultCode()) {
> $val = $resp->value();
> } else {
> 
> // Display problems that have been gracefully cought and
> // reported by the xmlrpc.php script.
> 
> $ErrMsg .= "VITAL_ERR_COMMUNICATION_ERROR";
> echo 'Fault Code: ' . $resp->faultCode() . "\n";
> echo 'Fault Reason: ' . $resp->faultString() . "\n";
> }
> 
> 
> ERROR DEBUG :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <methodResponse>
> <params>
> <param>
> <value><string>10</string></value>
> </param>
> </params>
> </methodResponse>
> ---END---
> 
> Fault Code: 2 Fault Reason: Invalid return payload: enable 
> debugging to
> examine incoming payload
> 
> _______________________________________________
> phpxmlrpc mailing list
> phpxmlrpc at lists.usefulinc.com
> http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc
> 


More information about the phpxmlrpc mailing list