Hello friends,

Is to possible to start an xmlrpc server using php from a php shell script ?

I'm trying but am getting an xml formated
error.
Please find below a copy of my error and my php script.

Thanks.
Rudi.

Error :
<?xml version="1.0"?>
<methodResponse>
<fault>
  <value>
    <struct>
      <member>
        <name>faultCode</name>
        <value><int>103</int></value>
      </member>
      <member>
        <name>faultString</name>
        <value><string>XML error: no element found at line 1</string></value>
      </member>
    </struct>
  </value>
</fault>
</methodResponse> 

My php shell script :


#!/usr/local/bin/php -q
<?php

include("/root/scripts/xmlrpc/xmlrpc.inc");
include("/root/scripts/xmlrpc/xmlrpcs.inc");


function foo ($params) {
        global $xmlrpcerruser; // import user errcode value
        // $params is an Array of xmlrpcval objects
        $vala=$params->params[0];
        $sval=$vala->scalarval();
        $ret=$sval*2;
        return new xmlrpcresp(new xmlrpcval($ret, "int"));
 }


$s=new xmlrpc_server( array("product" =>
                                array("function" => "foo")));
?> 
-- 

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


1 cent a minute calls anywhere in the U.S.!

http://www.getpennytalk.com/cgi-bin/adforward.cgi?p_key=RG9853KJ&url=http://www.getpennytalk.com


--
For information about how to subscribe and unsubscribe from this list
visit http://xmlrpc.usefulinc.com/list.html

Reply via email to