• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Duplicate, Sorry!] XMLRPC cannot map external class functions.

I am using CI 1.6.2
        $request = array('How is it going?');
//server (class xmlserver)
    // >News controller exists with _GetNews fucntion but
    // you get a method does not exist error.
    // >When you move the _GetNews function to this controller
    // it will work
    $config['functions']['GetNews'] = array('function'=>'News._GetNews');
    //$config['functions']['GetNews'] = array('function'=>'Xmlserver._GetNews');

You cannot map functions that are in another controller outside the server controller.

why you may ask?

It fails on line 270 of the xmlrpcs.php code, as its trying to use is_callable on a controller/method that has not been loaded in the request, and so it fails.

Also if you look at line 325 of xmlrpcs.php there is commented out code which attempts to call an external controller but has obviously been commented out as it did not work, however the code will never get this far as it fails gracefully on line 270.

when you set up the functions array you have to precede the method name with the controller name, so it would imply that this should work.

Is the xmlrpc code designed to map to other controllers?
Is this a bug or a feature request?

Apologies this has already been discovered and logged


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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