You are not logged in.
Pages: 1
Hi all, i hope you are going great.
i have a problem in this situation as the following:
* i have a legacy application that runs under Delphi 7,
and need to communicate between them and new one developed with Delphi 10 (Because of compatibility with Hardware devices)
=> depends of the example : "04-InterfacedBasedServices"
1 - Run (as Admin) the server side with Delphi10.4.
2 - Run (as Admin) the client side with Delphi 7.
all going great but when i put the name and the msg and click "add message" btn, this error was occurred:
TInterfacedObjectFakeClient.FakeCall(IExample.Add) failed: '{
"errorCode":406,
"errorText":"IExample.Add failed parsing ASample: TSample from input JSON"
}'
Specs:
Delphi7(32bits), Delphi 10.4(64Bits)
Windows 10 (64Bits)
Any Help Plz
Offline
Hi, i resolved the problem with the following:
1 - Convert controls text values from Wide String to Utf-8 with "WideStringToUtf8" function.
2 - add a writer serialization for the "TSample" record for D7.
code:
const
__Tsample = 'Name, Question : RawUTF8;';
initialization
TRttiJson.RegisterFromText(TypeInfo(TSample), __TSample,
[jpoIgnoreUnknownProperty], []);
Sample.Name := WideStringToUtf8(NameEdit.Text);
Sample.Question := WideStringToUtf8(QuestionMemo.Text);
thnx for your quick answer and the great framework
Last edited by zakaria (2021-08-31 14:27:15)
Offline
Ok, Thanks a lot
Last edited by zakaria (2021-09-01 14:45:40)
Offline
Pages: 1