How to make xmlrpc server work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How to make xmlrpc server work (/showthread.php?tid=64590) |
How to make xmlrpc server work - littlefeather - 03-08-2016 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] RE: How to make xmlrpc server work - ciadmin - 03-08-2016 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? RE: How to make xmlrpc server work - skunkbad - 03-08-2016 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'); RE: How to make xmlrpc server work - littlefeather - 03-08-2016 (03-08-2016, 05:31 PM)skunkbad Wrote: This works for me: RE: How to make xmlrpc server work - ciadmin - 03-08-2016 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. RE: How to make xmlrpc server work - skunkbad - 03-09-2016 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. RE: How to make xmlrpc server work - littlefeather - 03-09-2016 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 RE: How to make xmlrpc server work - skunkbad - 03-09-2016 Any chance your files are encode UTF-8 with BOM? If so, try getting rid of the BOM. RE: How to make xmlrpc server work - littlefeather - 03-09-2016 (03-09-2016, 11:16 AM)skunkbad Wrote: Any chance your files are encode UTF-8 with BOM? If so, try getting rid of the BOM. How to do that or how do i find out if it is bom? [Solved] RE: How to make xmlrpc server work - littlefeather - 03-09-2016 I eneded up ownloading the lates CI and overwrote system folder now xmlrpc is working. |