XMLRPC Server Issue -- Method Not Found |
[eluser]ian r livingstone[/eluser]
I keep getting the following error: This is not a known method for this XML-RPC Server Results from when I query the XML-RPC server using xmlrpclib in Python: Code: Code: import xmlrpclib Result: Code: ian@ian-laptop:~/Desktop/clanware/api_tests$ python eve_data.py XML-RPC Server Code: Code: <?php Categories Controller Class Code: <?php PHP Test Code Code: function test () { Lastly, the API_Controller, I dunno -- maybe this is the issue? Code: <?php Anyways, when I functions into the API Class for testing purposes they work, and I tried to see if there were any errors being generated by the API_Controller, but nope. I'm pretty lost on this one, any ideas?
[eluser]gtech[/eluser]
Hello, I have not used CI for ages (1.4) but I remember comming across the same problem. firstly I assume you have loaded your libraries Code: $this->load->library('xmlrpc'); From memory you cannot call a controller from another controller in CI, and this is what you are doing by calling Categories.get_all from your Api controller. So even though the xmlrpc library suggests you can call functions from outside the xmlrpcserver controller.. you simply can't as the code is not designed to do this. If you move your Categories.get_all function to the Api class you will probably find it will work.. let me know how you get on. (I can't remember if I logged a bug about this, but it might make sense noteing somthing down in the CI docs?)
[eluser]ian r livingstone[/eluser]
According to the user guide you can do that, http://ellislab.com/codeigniter/user-gui...mlrpc.html, so either user guide is wrong or I have some sort of mistake.
[eluser]gtech[/eluser]
your right in respect that the guide says you can.. I am sure it is a bug, as I have spent ages head scratching this ages ago, and I remember reading through the code to see what it was doing, and it was trying to load the method from another controller, I put loads of debug to see where it was keeling over and it was keeling at that point... it looks like the problem is still there. If you move your method to the api controller I bet you it will work (just to humour me that loading to another controller is the problem) you could move your function code to a librabry if you want to abstract it. I am sure I mentioned this in the bug forum before, but it could of got overlooked.
[eluser]ian r livingstone[/eluser]
alright, yea, I was going to look through the XMLRPCS lib, but just hadn't gotten around to it.
[eluser]gtech[/eluser]
I wasn't going mad [url="http://codeigniter.com/bug_tracker/bug/4300/"]bug report[/url] however I don't think this problem has been resolved.. or the docs are confusing, hence why you have recently stumbled across the same problem. might be worth adding your pennies worth? |
Welcome Guest, Not a member yet? Register Sign In |