Page 1 of 1

Xmlrpc php help...

Posted: Wed Sep 10, 2008 9:31 pm
by Aric_Holland
Hello :( ,

I have an java program that connects to an webserver and communicates with an php file through xmlrpc. I have the need for more functions and so I need a little help here to have my server process each request:

Code:

Code: Select all

 
 
function Login($xmlrpcmsg)
{
    $result = "Hi from the server, " . "Username: " . $xmlrpcmsg->getParam(0)->scalarVal() . " Password: " . $xmlrpcmsg->getParam(1)->scalarVal();
    return new xmlrpcresp(new xmlrpcval($result, "string"));
}
 
$s = new xmlrpc_server(array(
        "XmlRpcDemo.Login" => array(
            "function" => "Login",
            "signature" => $login_sig)
            ));
 
 
basically i need $s to point to different methods. Like and register method for instance. Let me show you by code example:

Code: Select all

 
$s = new xmlrpc_server(array(
              "XmlRpcDemo.Login" => array(
                                                     "function" => "Login",
                                                     "signature" => $login_sig))
              "XmlRpcDemo.Register" => array(
                                                    "function" => "Register",
                                                    "signature" => $login_sig)));
 
but that doesnt work you see? So how do I get this to work. Please help me!

Much Appreciated,

Aric Holland

Re: Xmlrpc php help...

Posted: Fri Sep 12, 2008 5:45 pm
by Aric_Holland
No one knows?? ...