Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2023-11

jsonrpc - does it still work?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi all,

I'm playing with json-rpc but can't get it to work.

I've tried the examples in fcl-web/examles/jsonrpc. I couldn't follow the readme as there are no lpi-files, so that the rttirpc.lpg does not work. But also this fails:

rtti]$ ppcx64 demorpcrtti.lpr
Free Pascal Compiler version 3.3.1 [2023/11/23] for x86_64 Copyright (c) 1993-2023 by Florian Klaempfl and others Target OS: Linux for x86-64
Compiling demorpcrtti.lpr
Compiling resource demorpcrtti.or
Linking demorpcrtti
demorpcrtti.lpr(32,1) Warning: "crtbegin.o" not found, this will probably cause a linking failure
demorpcrtti.lpr(32,1) Warning: "crtend.o" not found, this will probably cause a linking failure
33 lines compiled, 0.2 sec, 1304576 bytes code, 623944 bytes data 2 warning(s) issued

rtti]$ ppcx64 rpcclient.lpr
Free Pascal Compiler version 3.3.1 [2023/11/23] for x86_64 Copyright (c) 1993-2023 by Florian Klaempfl and others Target OS: Linux for x86-64
Compiling rpcclient.lpr
Linking rpcclient
88 lines compiled, 0.2 sec, 1166496 bytes code, 527936 bytes data

rtti]$ ./demorpcrtti &
[1] 2913859

rtti]$ ./rpcclient
===== Testing SayHello
An unhandled exception occurred at $00007F96D7E6A010: EAccessViolation: Access violation
$00007F96D7E6A010
$0000000000401A06

It fails at 'client.SayHello'. The invoke-logic is never called.

Maybe I miss a compiler-directive?

Regards,

Joost

Reply by email

Michael Van Canneyt
to Joost van der Sluis
Joost van der Sluis wrote 41 lines
Hi all, I'm playing with json-rpc but can't get it to work. I've tried the examples in fcl-web/examles/jsonrpc. I couldn't follow the readme as there are no lpi-files, so that the rttirpc.lpg does not work. But also this fails: rtti]$ ppcx64 demorpcrtti.lpr Free Pascal Compiler version 3.3.1 [2023/11/23] for x86_64 Copyright (c) 1993-2023 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling demorpcrtti.lpr Compiling resource demorpcrtti.or Linking demorpcrtti demorpcrtti.lpr(32,1) Warning: "crtbegin.o" not found, this will probably cause a linking failure demorpcrtti.lpr(32,1) Warning: "crtend.o" not found, this will probably cause a linking failure 33 lines compiled, 0.2 sec, 1304576 bytes code, 623944 bytes data 2 warning(s) issued rtti]$ ppcx64 rpcclient.lpr Free Pascal Compiler version 3.3.1 [2023/11/23] for x86_64 Copyright (c) 1993-2023 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling rpcclient.lpr Linking rpcclient 88 lines compiled, 0.2 sec, 1166496 bytes code, 527936 bytes data rtti]$ ./demorpcrtti & [1] 2913859 rtti]$ ./rpcclient ===== Testing SayHello An unhandled exception occurred at $00007F96D7E6A010: EAccessViolation: Access violation $00007F96D7E6A010 $0000000000401A06 It fails at 'client.SayHello'. The invoke-logic is never called.

I have the jsonrpc in use in various commercial applications in production, so yes it definitely works.

But I must admit I have not looked at the examples in a long time.

I'll have a look this weekend.

Michael.

Reply by email

Michael Van Canneyt
to Joost van der Sluis: I'm playing with json-rpc but can't get it to work. I've tried the examples in…
Joost van der Sluis wrote 7 lines
Hi all, I'm playing with json-rpc but can't get it to work. I've tried the examples in fcl-web/examles/jsonrpc. I couldn't follow the readme as there are no lpi-files, so that the rttirpc.lpg does not work. But also this fails:

The .lpi files where not there because .lpi is in the ignore list, so I never noticed they were not in the repo :/

I committed them, and removed the *.lpi stance from the .gitignore file.

I corrected the example. The "classname" property in the json-rpc request has been renamed to "class", but the example was not adapted for this. This is now done.

I tested both client examples, both work.

Michael.

Reply by email