0
I am doing the integration with the webservice of Total Express Transport and importing the wsdl made available by them has been created several properties where types are Txsdecimal and Txsdate.
When trying to assign a value to a property that has the type as Txsdate this occurs the access error Violation.
Below follows the code I am developing:
procedure TForm1.Button3Click(Sender: TObject);
var
Registra : RegistraColetaRequest;
AuxEncomendas : Encomendas;
AuxNfe : DocFiscalNFe;
encom : Encomenda;
nota : NFe;
begin
Registra := RegistraColetaRequest.Create;
TXSDate.Create;
encom := Encomenda.Create;
encom.IdCliente := 'teste';
encom.DestNome := 'Destinatario teste';
SetLength(AuxEncomendas, 1);
Registra.CodRemessa := '1315';
nota := NFe.Create;
nota.NfeChave := '12315645645645564';
//Nesta linha ocorre o erro comentado
nota.NfeData.AsDate := Date;
SetLength(AuxNfe, 1);
AuxNfe[0] := nota;
encom.DocFiscalNFe := AuxNfe;
AuxEncomendas[0] := encom;
Registra.Encomendas := AuxEncomendas;
(HTTPRIO as webservice_v24_totalPortType).RegistraColeta(Registra);
end;