[eluser]Jamie Rumbelow[/eluser]
Having a little trouble with the XML-RPCS, this is my server class:
Code:
$config['functions']["getLatestPost"] = array("function"=>"News.getLatestPost");
$config['functions']["getPosts"] = array("function"=>"News.getPosts");
$config['object'] = $this;
$this->xmlrpcs->initialize($config);
$this->xmlrpcs->serve();
And my request:
Code:
...
$this->xmlrpc->server($site_url, 80);
$this->xmlrpc->method('getLatestPost');
$request = array("0000000000");
$this->xmlrpc->request($request);
...
My Response, when I die(print_r($this->methods));
Code:
---DATA---
HTTP/1.1 200 OK
Date: Fri, 13 Jun 2008 21:35:40 GMT
Server: Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
X-Powered-By: PHP/5.2.5
Content-Length: 2069
Connection: close
Content-Type: text/html
Array
(
[system.listMethods] => Array
(
[function] => this.listMethods
[signature] => Array
(
[0] => Array
(
[0] => array
[1] => string
)
[1] => Array
(
[0] => array
)
)
[docstring] => Returns an array of available methods on this server
)
[system.methodHelp] => Array
(
[function] => this.methodHelp
[signature] => Array
(
[0] => Array
(
[0] => string
[1] => string
)
)
[docstring] => Returns a documentation string for the specified method
)
[system.methodSignature] => Array
(
[function] => this.methodSignature
[signature] => Array
(
[0] => Array
(
[0] => array
[1] => string
)
)
[docstring] => Returns an array describing the return type and required parameters of a method
)
[system.multicall] => Array
(
[function] => this.multicall
[signature] => Array
(
[0] => Array
(
[0] => array
[1] => array
)
)
[docstring] => Combine multiple RPC calls in one request. See http://www.xmlrpc.com/discuss/msgReader$1208 for details
)
[getLatestPost] => Array
(
[function] => News.getLatestPost
)
[getPosts] => Array
(
[function] => News.getPosts
)
)
1
---END DATA---
The XML data receieved was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further.
I'm getting a "Method not found" error when I don't "die"
Could somebody give me some help?