开发者

Codeigniter's XML-RPC shows no response data

I'm attempting to connect to an XML RPC server with no luck, I am getting an empty response with no debugging information whatsoever. I've switched 开发者_如何学Con set_debug(), but still nothing.

Can anyone tell me why I am getting no response from the server, no error information and no debug information?

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

        $this->xmlrpc->server('https://myurl.com/xmlrpc', 80);
        $this->xmlrpc->method('login');

        $request = array('param1', 'param2');
        $this->xmlrpc->request($request);

        echo 'Error: '. $this->xmlrpc->display_error() . '<br/>';
        echo 'Response: '. print_r($this->xmlrpc->display_response(), true) . '<br/>';


Even if you type https:// in server method you are still connecting with server via http, look at 2nd parameter - the port you have set is 80.

Just in case.


I forgot to use:

$this->xmlrpc->send_request()

its best used in a conditional statement like:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜