Welcome Guest, Not a member yet? Register   Sign In
Top level XML-RPC element is missing

Hi ya,
Im playing around with xml-rpc for the first time and I'm getting this error:
Top level XML-RPC element is missing

I now pretty much just copy/pasted the example code from the user guide, all I've changed is the server's controller and method names.

class Update extends Controller {

  function Update() {

  function index() {

    $config['functions']['check'] = array ('function'=>'Update.check');


  function check($request) {
    $parameters = $request->output_parameters();

    $response = array (
    array (
    'i_respond'=>'Not bad at all.'),

    return $this->xmlrpc->send_response($response);


and the client function:

function checkVersion() {
    $server_url = site_url('update');
    $request = array('How is it going?');
    $this->xmlrpc->server($server_url, 80);
    if (!$this->xmlrpc->send_request()) {
       $output = $this->xmlrpc->display_error();
    else {
      $output = '<pre>';
      $output .= print_r($this->xmlrpc->display_response(), true);
      $output .= '</pre>';
    return $output;

anyone see whats wrong here?


Theme © iAndrew 2016 - Forum software by © MyBB