![]() |
help for me about xmlrpc error! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: help for me about xmlrpc error! (/showthread.php?tid=8278) |
help for me about xmlrpc error! - El Forum - 05-12-2008 [eluser]Unknown[/eluser] class Websvr extends Controller { function Websvr(){ parent::Controller(); } function index() { $this->load->library('xmlrpc'); $this->load->library('xmlrpcs'); $this->load->library('MY_Xmlrpc'); $this->load->library('adodb_loader',array('group'=>'mssql')); $config['functions']['rsyncpassword'] = array('function' => 'Websvr.rsyncpassword'); $this->xmlrpcs->initialize($config); $this->xmlrpcs->serve(); } function rsyncpassword($request){ $parameters_rsync = $request->output_parameters(); $response_rsync = array( array('username' => $parameters_rsync['0'],'password' => $parameters_rsync['1']), 'struct' ); $row = $this->adodb->getrow("SELECT * FROM baseinfo WHERE account = '{$response_rsync[0]['username']}'"); $returnData = array( array('password'=>$row), 'struct' ); return $this->xmlrpc->send_response($returnData); } } ?> ---DATA--- HTTP/1.1 200 OK Date: Tue, 13 May 2008 06:03:12 GMT Server: Apache/2.2.4 (Win32) PHP/5.2.6 X-Powered-By: PHP/5.2.6 Content-Length: 306 Connection: close Content-Type: text/xml <hr /> (mssql): SELECT * FROM baseinfo WHERE account = 'testacc' <hr /> <?xml version="1.0" encoding="UTF-8"?> <methodResponse> <params> <param> <value> <struct> <member> <name>password</name> <value> <string>123456</string> </value> </member> </struct></value> </param> </params> </methodResponse> ---END DATA--- Error: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. Is there any errors in the code?I don’t know what’s wrong with it. help for me about xmlrpc error! - El Forum - 05-13-2008 [eluser]gtech[/eluser] why is: Code: <hr /> being returned in your response? are you echoing any content inside $this->adodb->getrow? |