[phpxmlrpc] php_xmlrpc_decode() doesn't return anything

Bosky, Dave Dave.Bosky at htcinc.net
Tue Aug 21 16:51:48 BST 2007

The method executes perfect and does what it should. But it always
returns a 'XML error at line 1, check URL' at the end if it works.
I've got debug mode set to 2 to show everything.

I'm not sure what to do since it works but I need to extract the 'id'
field returned. 
The php_xmlrpc_decode() doesn't return anything if I move it outside or
inside the if statement.

Can anyone see something I'm doing wrong? Thanks Again.

Here's my code.
$xmlrpc_client = new xmlrpc_client('x.pl','',443);
$xmlrpc_client->setProxy('proxy.com', '8080', '', '', 1);

$xmlrpc_msg = new xmlrpcmsg('create.entry');
$xmlrpc_msg->addParam(new xmlrpcval('id','string'));
$xmlrpc_msg->addParam(new xmlrpcval(0,'int'));
$xmlrpc_resp = $xmlrpc_client->send($xmlrpc_msg,40,"https"); 
// $decoded_response = php_xmlrpc_decode($xmlrpc_resp->value());
// print "resp: ".$decoded_response;

if ($xmlrpc_resp->faultCode()) {
	$decoded_response = php_xmlrpc_decode($xmlrpc_resp->value());
	print "decode: ".$decoded_response;
} else {
      print "<BR>Fault: Code: ".$xmlrpc_resp->faultCode();
	print "<BR>Reason '".$xmlrpc_resp->faultString()."'<BR>";

Here's the dump.
<?xml version="1.0"?>

HTTP/1.0 200 Connection established

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Tue, 21 Aug 2007 15:40:09 GMT
Server: Apache
MIME-version: 1.0
P3P: policyref="/w3c/p3p.xml", CP="Content-Length: 402"
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml

<?xml version="1.0"?>


XML error at line 1, check URL

Dave Bosky | Information Services | HTC | direct:  843-369-8613 | fax:
843-369-7178 | dave.bosky at htcinc.net

HTC Disclaimer:  The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.  Thank you.

More information about the phpxmlrpc mailing list