Hi there, i have a client which handles only xml response. How to do this with RO? I added a TROXMLRpcMessage to the server Dispatchers und was expecting a magic RO thing. But the result is in json?
type
TVersion = class(TROComplexType)
private
FVersion: ROUTF8String;
published
{$IFDEF RO_RTTI_Support} [ROSerializeAsUTF8String] {$ENDIF}
property Version: ROUTF8String read FVersion write FVersion;
end;
[ROService(__ServiceName,__ServiceID)]
TLprSbRestService = class(TRORemoteDataModule)
private
public
[ROServiceMethod]
[ROCustom('HttpApiPath','lpr')]
[ROCustom('HttpApiMethod','Get')]
function GetVersions: TROArray<TVersion>;
end;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
{ TLprSbRestService }
function TLprSbRestService.GetVersions: TROArray<TVersion>;
var
v: TVersion;
begin
Result:= TROArray<TVersion>.Create;
v:= Result.Add;
v.Version:= '1.0.0.1';
v:= Result.Add;
v.Version:= '1.0.0.2';
end;
The result is in json
[{"Version":"1.0.0.1"},{"Version":"1.0.0.2"}]
Do i have to create the result somehow manually? If so how? It should be like:
<?xml version = "1.0" encoding = "utf-8"?>
<lpr:versions xmlns:lpr="http://3rdparty.com/lpr">
<version>v01.00</version>
<version>v01.01</version>
</lpr:versions>
Where can i overwrite the rest function result?