CodeIgniter Forums
xml-rpc server specify request format - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: xml-rpc server specify request format (/showthread.php?tid=29508)



xml-rpc server specify request format - El Forum - 04-12-2010

[eluser]Unknown[/eluser]
Hello,

I am very new to CodeIgniter.

I have a server in PHP running with CI. I have Java / VB clients that need to connect to this server and get data using XML-RPC.

I have tried using the example in the Xml-RPC guide for the server:
http://ellislab.com/codeigniter/user-guide/libraries/xmlrpc.html
The test server is running in my local machine.

However, I get an error when I try to call the server. For client, I am trying to use a simple html form that post the data and calls the server. Shouldnt it work?
I need to specify the format for the Clients to connect and I could not find a good enough documentation.

client code :

---------------------------------------------
<?php
$xml='
<?xml version="1.0"?>
<methodCall>
<methodName>Greetings</methodName>
<params>
<param>
<value>How is it going?</value>
</param>
</params>
</methodCall>
';
$xml = htmlspecialchars($xml);
?&gt;

&lt;form method='post' action='http://localhost/testci/index.php/xmlrpc_server'&gt;
&lt;input type='text' name='xml' value='&lt;?php echo $xml;?&gt;'&gt;
&lt;input type='submit' name='submit' value='submit'&gt;
&lt;form&gt;

-----------------------------

I get the error :
XML Parsing Error: not well-formed
Location: http://localhost/testci/index.php/xmlrpc_server
Line Number 1, Column 6:array(2) {
-----^


Thanks.


xml-rpc server specify request format - El Forum - 04-12-2010

[eluser]Unknown[/eluser]
Found the reply at :

http://stackoverflow.com/questions/782879/can-a-xml-rpc-request-be-made-from-an-html-form

Thanks!