Welcome Guest, Not a member yet? Register   Sign In
How to make xmlrpc server work
#1

I have followed (cut and paste) your xmlrpx example form the user guide. I would expect hat the end result would be that the example would work but no it failes. I have tried every possible example i could find online and nothing works

Here is my xmlrpc_server controller


Code:
[code]<?php

class Xmlrpc_server extends CI_Controller {

        public function index()
        {
                $this->load->library('xmlrpc');
                $this->load->library('xmlrpcs');

                $config['functions']['Greetings'] = array('function' => 'Xmlrpc_server.process');
$config['object'] = $this;
                $this->xmlrpcs->initialize($config);
                $this->xmlrpcs->serve();
        }


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

                $response = array(
                        array(
                                'you_said'  => $parameters[0],
                                'i_respond' => 'Not bad at all.'
                        ),
                        'struct'
                );

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

here is my xmlrpc client controller
Code:
<?php

class Xmlrpc_client extends CI_Controller {

        public function index()
        {
                $this->load->helper('url');
                $server_url = site_url('xmlrpc_server/index');

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

                $this->xmlrpc->server($server_url, 80);
                $this->xmlrpc->method('Greetings');

                $request = array('How is it going?');
                $this->xmlrpc->request($request);

                if ( ! $this->xmlrpc->send_request())
                {
                        echo $this->xmlrpc->display_error();
                }
                else
                {
                        echo '<pre>';
                        print_r($this->xmlrpc->display_response());

                        echo '</pre>';
                }
        }
}
the error i am getting is totaly useless

The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further.

How do i make this work waht is wrong with my files?


[/code]
Reply


Messages In This Thread
How to make xmlrpc server work - by littlefeather - 03-08-2016, 01:43 PM
RE: How to make xmlrpc server work - by ciadmin - 03-08-2016, 05:06 PM
RE: How to make xmlrpc server work - by skunkbad - 03-08-2016, 05:31 PM
RE: How to make xmlrpc server work - by ciadmin - 03-08-2016, 10:53 PM
RE: How to make xmlrpc server work - by skunkbad - 03-09-2016, 10:01 AM
RE: How to make xmlrpc server work - by skunkbad - 03-09-2016, 11:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB