• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XML RPC MYSQL WOES

#1
[eluser]NewToCodeIgnitor[/eluser]
I know similar question is answered earlier but my problem still exist. Please consider following test example.

ENV:
-----
PHP5, MYSQL5

Error from RPC CLIENT:
-----------------------
"The XML data receieved was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further."


Code Snippet on RPC Client
---------------------------
$request = array (array($articleId, 'int'),'struct');
$this->CI->xmlrpc->request($request);

if ( ! $this->CI->xmlrpc->send_request())
{
return $this->CI->xmlrpc->display_error();
}
else
{
return $this->CI->xmlrpc->display_response();
}


Code Snippet on RPC Server
--------------------------
$sqlQuery = 'select title, content from ARTICLE where articleId='.$articleId;
$query = $database->query($sqlQuery);
$responseArray = array();
foreach ($query->result_array() as $row)
{
array_push($responseArray, array($row,'struct'));
}
$response = array($responseArray,'struct');
return $this->xmlrpc->send_response($response);


Response on the browser
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>0</name>
<value>
<struct>
<member>
<name>title</name>
<value>
<string>Test Article</string>
</value>
</member>
<member>
<name>content</name>
<value>
<string>TEST ARTICLE THIS IS</string>
</value>
</member>
</struct></value>
</member>
</struct></value>
</param>
</params>
</methodResponse>


No idea why RPC CLIENT is not considering above xml response from the RPC server as valid response.


Messages In This Thread
XML RPC MYSQL WOES - by El Forum - 12-14-2008, 01:48 PM
XML RPC MYSQL WOES - by El Forum - 12-14-2008, 03:08 PM
XML RPC MYSQL WOES - by El Forum - 12-14-2008, 05:16 PM
XML RPC MYSQL WOES - by El Forum - 12-15-2008, 02:19 PM
XML RPC MYSQL WOES - by El Forum - 12-15-2008, 04:42 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.