Welcome Guest, Not a member yet? Register   Sign In
XML-RPC Help sending data...
#1

[eluser]the1rob[/eluser]
Ok, I've been chewing on this for a while, with no success. I went through all the documentation I could find...I even went through these forums.

My problem is this: I set up a xmlrpc server. Now I want to send data to it. The client and server talk to each other fine...I can pass a method with no problem.

The issue is when I try to populate the parameters...

Code:
$request = array(
    'PARAM1' => array($_POST['PARAM1DATA'],'string'),
    'PARAM2' => array($_POST['PARAM2DATA'],'string'),
    'PARAM3' => array($_POST['PARAM3DATA'],'string'),
    'PARAM4' => array($_POST['PARAM4DATA'],'string'),
    'PARAM5' => array($_POST['PARAM5DATA'],'string')
    );

$server_url = site_url('xmlrpc');    
$this->xmlrpc->server($server_url, 80);
$this->xmlrpc->method('sendpacket');
$this->xmlrpc->request($request);    

if ( ! $this->xmlrpc->send_request())
{
    log_message('debug', "hit if branch 1");
    echo $this->xmlrpc->display_error();
}
else
{
    log_message('debug', "hit else branch");
    echo '<pre>';
    print_r($this->xmlrpc->display_response());
    echo '</pre>';
}

Once I hit the send_request I get a bunch of PHP errors:

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Xmlrpc.php

Line Number: 627


I get 4 of those, then...

Fatal error: Call to a member function serialize_class() on a non-object in /home/srwww/system/libraries/Xmlrpc.php on line 646

Sooo...something is wrong with my $request array. Can someone, ANYONE, please take a look and nudge me in the right direction? I'm dying here.





-t1r


Messages In This Thread
XML-RPC Help sending data... - by El Forum - 06-18-2009, 03:14 PM
XML-RPC Help sending data... - by El Forum - 06-18-2009, 06:00 PM
XML-RPC Help sending data... - by El Forum - 06-18-2009, 06:04 PM
XML-RPC Help sending data... - by El Forum - 06-18-2009, 08:39 PM
XML-RPC Help sending data... - by El Forum - 06-18-2009, 08:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB