How to make xmlrpc server work |
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 here is my xmlrpc client controller Code: <?php 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]
If you turn xmlrpc debugging on, you can see if a server exception is being returned or if the return "xml" starts with a space instead of the expected XML signature. The latter can happen if you have closing PHP tags with trailing whitespace.
I also notice that you are using the url helper ... have you set the base_url in your config.php?
This works for me:
Client: PHP Code: <?php if( ! defined('BASEPATH') ) exit('No direct script access allowed'); Server: PHP Code: <?php if( ! defined('BASEPATH') ) exit('No direct script access allowed');
(03-08-2016, 05:31 PM)skunkbad Wrote: This works for me:
Turn xmlrpc debugging on, and show the result. It *really* sounds like your xmlrpc server is returning "xml" that starts with a space or some other invalid character. The latter can happen if you have closing PHP tags with trailing whitespace.
If you used my code as-is, and got that error message, then I don't know what to tell you.
Just curious if you really must use XML? It's way easier to create a client/server for JSON. On the client side, all you do is create an array and json_encode it, then echo the encoded string. On the server side all you do is json_decode the request and you're done.
Yes i have to use xml as i am making a web interface or a program that only uses xmlrpc
hear is the xml debug output http://pastebin.com/AYRHaVBW
Any chance your files are encode UTF-8 with BOM? If so, try getting rid of the BOM.
I eneded up ownloading the lates CI and overwrote system folder now xmlrpc is working.
|
Welcome Guest, Not a member yet? Register Sign In |