Good afternoon.
A client wants to send me an .xml file
I created a DataSnap Rest Application project.
I implemented the method as follows for JSON
function TFo_SM_Fornecedor.updateFornecedor(TObjJson: TJsonObject): TJsonValue;
Var
Fornecedor: TFornecedor;
begin
Fornecedor := TJson.JsonToObject<TFornecedor>(TObjJson.toJson);
Try
Result := TJSONString.Create('Incluindo Cliente..: ' +
Fornecedor.tx_razaosocial);
Finally
FreeandNil(Fornecedor);
End;
end;
To receive a TJsonObject type works perfectly. But as I said at the beginning I will receive an .xml. I have already made several delphi codes to receive an xml and put the values in the base, but it is the first time I have to develop a server and I am without a direction. Can any of my colleagues give me a light? At first (for a few days now) I'm trying to change the line parameter
function TFo_SM_Folder.updateSupport (TObjJson: TJsonObject):
for something like
function TFo_SM_Provider.updateSupport (XML_files: TStringTream):
But I'm unsuccessful. If any of you can give me a light, thank you.