• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
xml-rpc server using a function in another Controller

#1
[eluser]Unknown[/eluser]
Hello all,

Was wondering if someone could shed some light on the following for me please:

I have a Controller: Server_live that will act as my entry point for the XML-RPC server I am creating, the index function has the following:

$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');

$config['functions']['connectiontest'] = array('function' => 'System_utilities.connectiontest');

$config['object'] = $this;
$this->xmlrpcs->initialize($config);
$this->xmlrpcs->serve();

I have another controller called System_utilities which has a function connectiontest which takes a single parameter of $request.

Now when I try to call the connectiontest function from my client I receive an error back from the server stating that the Server does not have a function called connectiontest.

I managed to get it working by changing the mapping to be Server_live.connectiontest and add the function to the same controller as the Index() function above but this is not ideal and I would love to have the functions spread out all over the place so as to not make this single file absolute huge.

I have tried everything I can think of and the only way seems to be if they are in the same controller, surely this is not the case though.

Any ideas welcomed,

Thanks
.FxN


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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