../pvss.htm menu.gif basics.gif

xmlrpcCall()

Calls the function "function" on the server with the arguments of the parameter "args". If "result" is specified, the function waits for the answer from the server and saves the answer in "result". This corresponds to the call  result = function(args[1], ...);

Synopsis

int xmlrpcCall(string id, string function, dyn_mixed args [, mixed

result]);

Parameters

Return value

If an error occurs, -1 is returned. 0 means that the call could be sent successfully. If the call was executed successfully can be queried using getLastError().

 

Description

Calls the function "function" on the server with the arguments of the parameter "args". If "result" is specified, the function waits for the answer from the server and saves the answer in "result". This corresponds to the call  result = function(args[1], ...);

 

example.gifEXAMPLE

 

Connect to the server as follows, call the function on the server as well as close the connection to the server:

#uses "CtrlXmlRpc"

main()

{

string id = "servID";

string func = "wccoa.own.testmethod";

dyn_mixed args = makeDynString("World");;

mixed res;

string host = "localhost";

int port = "80";

bool secure = FALSE;

xmlrpcClient();

xmlrpcConnectToServer(id, host, port, secure);

xmlrpcCall(id, func, args, res);

DebugN("Result of XmlRpc call", res);

xmlrpcCloseServer(id);

}

 

Member of

 

Availability

 

See also

xmlrpcConnectToServer(), xmlrpcCloseServer(), xmlrpcClient(), xmlrpcDecodeRequest(), xmlrpcEncodeResponse(), xmlrpcHandler()

 

Top Of Page

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved