CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
error while executing XML RPC functions


New User

Apr 14, 2011, 6:50 AM

Post #1 of 1 (4993 views)
error while executing XML RPC functions Can't Post

Hi All

I have written a rpc call using frontier::client module and the server with frontier::deamon.
Below is the client code snippet []

use Frontier::Client;
# Make an object to represent the XML-RPC server.
$server_url = "https://ipaddress/cgi-bin/";
$server = Frontier::Client->new('url' => $server_url,'debug' => 1,'username' => 'user','password' => pass','encod
ing' => 'ISO-8859-1');
@args = (2,5);
$sumval = $server->call('sum'), "\n";

Below is the server code snippet []

print "Content-type: text/html \n\n";
use Frontier::Daemon;
sub sum{
return 2;
# Call me as http://localhost:8080/RPC2
my $d=Frontier::Daemon->new( methods => {sum => \&sum},LocalPort => 443,LocalAddr => localip);

But when i execute i am getting the follwing error in the response

---- request ---- 
<?xml version="1.0" encoding="ISO-8859-1"?>
---- response ----

no element found at line 1, column 0, byte -1 at /opt/perl/lib/site_perl/5.8.0/sun4-solaris/XML/ line 187

Please help me on this...


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives