RTC Forums

Subscription => Support => Topic started by: gerryw on December 14, 2009, 06:34:30 PM



Title: XML-RPC question
Post by: gerryw on December 14, 2009, 06:34:30 PM
Hello All,

I have just started using RTC and I want to make sure I am understanding the XML-RPC support correctly. I have notice that if I use the RtcClientModule, the args are sent as a structure. This would seem to mean that for doing generic XML-RPC, I would need to build the request xml myself. I am also trying to figure out what facilities, if any, are available for parsing the response. Do I need to do this with an xml parser ala TXMLDocument etc.? All of this assumes a non-RTC server of course. Any pointers on this would be greatly appreciated.

Thanks,
-G


Title: Re: XML-RPC question
Post by: D.Tkalcec (RTC) on January 21, 2010, 11:32:22 AM
Any server which understands XML-RPC should be capable of parsing data received in a <struct>. But if you need to talk to a third-party Server which has remote functions implemented so that all parameters are expected inside <params> where each parameter is a separate <param>, to force this behavior on RtcClientModule, preparing your remote function call parameters inside a "params" array, like this:

with CliModule.Data.newFunction('MyRemoteFunctionName').newArray('params') do
  begin
  asString[0]:='myParam0';
  asInteger[1]:=123456;
  asFloat[2]:=1234.56;
  end;

Best Regards,
Danijel Tkalcec