Hola:
Hice la conexión a un webservice (Visual C) , pero uno de los métodos requiere de arreglos de tipo ArrayOfAnytype, el problema es que esta clase no tiene un método add, alguien sabe como se puede manejar esta clase?
Código Delphi
[-]
ArrayOfAnyType = class(TRemotable)
private
FanyType: anyType;
public
FList: TList;
constructor Create; override;
function GetVariantArray(Index: Integer): Variant;
function GetVariantArrayLength: Integer;
property VariantArray[Index: Integer]: Variant read GetVariantArray; default;
property Len: Integer read GetVariantArrayLength;
procedure Add(Valor : TRemotable);
published
property anyType: anyType read FanyType write FanyType;
end;
-------------------------------------------------------------------------
Código Delphi
[-]
procedure ArrayOfAnyType.Add(Valor: TRemotable);
begin
FList.Add(Valor);
end;
constructor ArrayOfAnyType.Create;
begin
inherited Create;
FSerializationOptions := [xoInlineArrays];
FList := TList.Create();
end;
function ArrayOfAnyType.GetVariantArray(Index: Integer): Variant;
begin
Result := FanyType[Index];
end;
function ArrayOfAnyType.GetVariantArrayLength: Integer;
begin
if Assigned(FanyType) then
Result := Length(FanyType)
else
Result := 0;
end;