3
Good afternoon.
A client wants to send me an . xml file
I created a Datasnap Rest Application project.
I have 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 type Tjsonobject works perfectly.
But as I said at the beginning I will receive an . xml.
I have done several codes in Delphi 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 one of your colleagues shed some light?
At first ( a few days ago) I’m trying to change the parameter of the line
Function Tfo_sm_supplier.updateFornecedor(Tobjjson: Tjsonobject):
for something like
Function Tfo_sm_vendor.updateFornecedor(pArquivo_XML: Tstringtream):
But I am unsuccessful. If any of you can give me a light thank you.
Good morning @Júnior Moreira. Thank you for your attention :). Dude.. THE CLIENT WILL NOT CHANGE HIS . XML. That’s a fact. So I have to receive it the way it comes. His system sends an . XML file to an address. The only thing he can do on his side is CHANGE THE ADDRESS WHERE .XML. Do you understand me? That’s why I think I have to change the function parameter. If it is possible to skype, it would be of great help to me. : ) Or right here :) Hugs..
– Ricardo M.Souza
Ok, I will prepare a proper response since the client cannot change the request!
– Junior Moreira
Good morning @Júnior Moreira. Thanks for your attention.. : ) I’m on hold.. I’m trying something here too. I hope to get somewhere. Hugs.
– Ricardo M.Souza