RTC Forums
November 23, 2024, 05:15:06 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: XmlRpc is not responding?  (Read 5305 times)
brian71us
RTC Expired
*
Posts: 15


« on: November 14, 2017, 03:36:59 PM »

Hello,

I'm working on an XmlRpc application in Delphi 10.2 Tokyo with the latest version of RealThinClient. Instead of using DataModules the application will have classes that create the web server and components in code so these can be used in both FireMonkey and VCL applications easily. Right now the application serves up the web pages but the server is not responding to the XmlRpc commands. This is all converted from visually designed forms / data modules so it's possible I'm simply missing a step.

There's a TWebServer class that creates the TRtcHttpServer and a couple of TRtcDataProvider. This essentially combines the web server with the file server data module from your demos. It does serve up the web pages and all of their content properly so I know I'm on the right port, the web server is running, etc.

There's a TWebService class that creates a TRtcDataProvider, a TRtcFunctionGroup, and a TRtcServerModule then links them all up to the TRtcHttpServer in the TWebServer.

Finally, a TRemoteFunction class creates the TRtcFunction and links it to the TRtcFunctionGroup. A TScriptedFunction class descends from TRemoteFunction which will execute server side scripts to process the client's requests. The goal is to use the same server with different applications using a built-in scripting engine.

The main form then creates the TWebServer, TWebService (passing it the TWebServer), and a couple of TRemoteFunction instances (passing it the TWebService).

Any help you could give would be greatly appreciated!  Smiley

The links to the web page and source are below.

http://www.scalesoftdevelopment.com/Bilanciai2.zip
http://www.scalesoftdevelopment.com/VPI.zip
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: November 14, 2017, 04:05:49 PM »

After a quick look at your code, I see that you are setting the "Name" property on the "RtcFunction" component, but should be setting the "FunctionName" property instead. The component is created in your "TRemoteFunction" constructor ("WebServices.pas" unit).

P.S. If you were using the "TRtcFunctionGroup" component in Delphi at design-time, you would see that something is wrong by looking at the "StatusCheck" property.

P.P.S. "DataModules" in Delphi (TDataModule) are non-visual component containers, which can be used at design-time and (provided you do NOT use code specific to a platform) can be used from VCL and FireMonkey Applications. Check the "rtcFileProvider.pas" and "rtcGatewayProbvider.pas" units in the "Examples/DataProviders" folder.

Best Regards,
Danijel Tkalcec
Logged
brian71us
RTC Expired
*
Posts: 15


« Reply #2 on: November 14, 2017, 05:48:37 PM »


That was it!

When I tried to add a DataModule created in an FMX application to my VCL project the IDE barks that I need to add the VCL library (and vice versa). Not sure how that would affect the application if at all.

Thank you
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: November 14, 2017, 07:09:54 PM »

After creating your new DataModule, before you start adding any components, make sure that ONLY "Classes" and "SysUtils" units are listed in the "uses" clause (or "System.SysUtils" and "System.Classes"). These two units are fully cross-platform in later Delphi versions and have no dependencies on the VCL or FireMokney.

Also, if you see {%CLASSGROUP 'Vcl.Controls.TControl'} or {%CLASSGROUP 'FMX.Controls.TControl'} in the unit, remove it. That is the ONLY difference between a Data Module created in a VCL and a Data Module created in a FireMonkey Application, but it is NOT required if you are NOT using components from VCL or FireMonkey in that Data Module.

When you add a Data Module created in a VCL Project to a FireMonkey Project (and vice-versa), you will still get a warning about the unit being "incompatible", but ... as long as you do NOT use any components or units from the VCL or FireMonkey in that Data Module, you can ignore that warning.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 17 queries.