unit VARELA_Invk;

{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading  }
{ the RODL file associated with this project .                               }
{                                                                            }
{ Do not modify this unit manually, or your changes will be lost when this   }
{ unit is regenerated the next time you compile the project.                 }
{----------------------------------------------------------------------------}

interface

uses
  {vcl:} Classes,
  {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
  {Used RODL Intf's:} DataAbstract_Intf,
  {Used RODL Invk's:} DataAbstract_Invk,
  {Generated:} VARELA_Intf;

type
  TEDI_Inventary_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
    procedure Invoke_CargarFicheroEDI(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TEDI_Sales_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
    procedure Invoke_CargarFicheroEDI(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TsrvLogin_Invoker = class(TROInvoker)
  private
  protected
  published
    procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_Ping(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_SetUserPassword(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_UpdateUsers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TsrvVentasTerminadas_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
    procedure Invoke_GetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_GetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_GetDataCrossTab(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_GetSchemaCrossTab(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TsrvInformes_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
  end;

  TsrvTransfereciaFicheros_Invoker = class(TROInvoker)
  private
  protected
  published
    procedure Invoke_UploadChunk(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_UploadFinished(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TsrvControles_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
  end;

  TsrvVentasEnProceso_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
    procedure Invoke_GetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_GetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TEDI_Log_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
    procedure Invoke_InsertarLog(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TsrvReferenciaGenerica_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
    procedure Invoke_GetProducto(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
    procedure Invoke_PasarProductosAEspera(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
  end;

  TsrvRecepciones_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
  end;

  TsrvDevoluciones_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
  end;

  TsrvTraspasos_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
  end;

  TsrvStock_Invoker = class(TDARemoteService_Invoker)
  private
  protected
  published
  end;

implementation

uses
  {RemObjects:} uRORes, uROClient;

{ TEDI_Inventary_Invoker }

procedure TEDI_Inventary_Invoker.Invoke_CargarFicheroEDI(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function CargarFicheroEDI(const FicheroCAB: String; const FicheroLIN: String; const FicheroCANT: String; out MsgError: String): Boolean; }
var
  FicheroCAB: String;
  FicheroLIN: String;
  FicheroCANT: String;
  MsgError: String;
  lResult: Boolean;
begin
  try
    __Message.Read('FicheroCAB', TypeInfo(String), FicheroCAB, []);
    __Message.Read('FicheroLIN', TypeInfo(String), FicheroLIN, []);
    __Message.Read('FicheroCANT', TypeInfo(String), FicheroCANT, []);

    lResult := (__Instance as IEDI_Inventary).CargarFicheroEDI(FicheroCAB, FicheroLIN, FicheroCANT, MsgError);

    __Message.Initialize(__Transport, 'VARELA', 'EDI_Inventary', 'CargarFicheroEDIResponse');
    __Message.Write('Result', TypeInfo(Boolean), lResult, []);
    __Message.Write('MsgError', TypeInfo(String), MsgError, []);
    __Message.Finalize;

  finally
  end;
end;

{ TEDI_Sales_Invoker }

procedure TEDI_Sales_Invoker.Invoke_CargarFicheroEDI(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function CargarFicheroEDI(const FicheroCAB: String; const FicheroLUG: String; const FicheroART: String; out MsgError: String): Boolean; }
var
  FicheroCAB: String;
  FicheroLUG: String;
  FicheroART: String;
  MsgError: String;
  lResult: Boolean;
begin
  try
    __Message.Read('FicheroCAB', TypeInfo(String), FicheroCAB, []);
    __Message.Read('FicheroLUG', TypeInfo(String), FicheroLUG, []);
    __Message.Read('FicheroART', TypeInfo(String), FicheroART, []);

    lResult := (__Instance as IEDI_Sales).CargarFicheroEDI(FicheroCAB, FicheroLUG, FicheroART, MsgError);

    __Message.Initialize(__Transport, 'VARELA', 'EDI_Sales', 'CargarFicheroEDIResponse');
    __Message.Write('Result', TypeInfo(Boolean), lResult, []);
    __Message.Write('MsgError', TypeInfo(String), MsgError, []);
    __Message.Finalize;

  finally
  end;
end;

{ TsrvLogin_Invoker }

procedure TsrvLogin_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function Login(const UserID: String; const Password: String; out LoginInfo: TLoginInfo): Boolean; }
var
  UserID: String;
  Password: String;
  LoginInfo: VARELA_Intf.TLoginInfo;
  lResult: Boolean;
  __lObjectDisposer: TROObjectDisposer;
begin
  LoginInfo := nil;
  try
    __Message.Read('UserID', TypeInfo(String), UserID, []);
    __Message.Read('Password', TypeInfo(String), Password, []);

    lResult := (__Instance as IsrvLogin).Login(UserID, Password, LoginInfo);

    __Message.Initialize(__Transport, 'VARELA', 'srvLogin', 'LoginResponse');
    __Message.Write('Result', TypeInfo(Boolean), lResult, []);
    __Message.Write('LoginInfo', TypeInfo(VARELA_Intf.TLoginInfo), LoginInfo, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(LoginInfo);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvLogin_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure Logout; }
begin
  try
    (__Instance as IsrvLogin).Logout;

    __Message.Initialize(__Transport, 'VARELA', 'srvLogin', 'LogoutResponse');
    __Message.Finalize;

    __oResponseOptions := [roNoResponse];

  finally
  end;
end;

procedure TsrvLogin_Invoker.Invoke_Ping(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function Ping: Boolean; }
var
  lResult: Boolean;
begin
  try
    lResult := (__Instance as IsrvLogin).Ping;

    __Message.Initialize(__Transport, 'VARELA', 'srvLogin', 'PingResponse');
    __Message.Write('Result', TypeInfo(Boolean), lResult, []);
    __Message.Finalize;

  finally
  end;
end;

procedure TsrvLogin_Invoker.Invoke_SetUserPassword(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function SetUserPassword(const UserID: String; const NewPassword: String): Boolean; }
var
  UserID: String;
  NewPassword: String;
  lResult: Boolean;
begin
  try
    __Message.Read('UserID', TypeInfo(String), UserID, []);
    __Message.Read('NewPassword', TypeInfo(String), NewPassword, []);

    lResult := (__Instance as IsrvLogin).SetUserPassword(UserID, NewPassword);

    __Message.Initialize(__Transport, 'VARELA', 'srvLogin', 'SetUserPasswordResponse');
    __Message.Write('Result', TypeInfo(Boolean), lResult, []);
    __Message.Finalize;

  finally
  end;
end;

procedure TsrvLogin_Invoker.Invoke_UpdateUsers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function UpdateUsers(const UsersDelta: Binary): Binary; }
var
  UsersDelta: Binary;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  UsersDelta := nil;
  lResult := nil;
  try
    __Message.Read('UsersDelta', TypeInfo(Binary), UsersDelta, []);

    lResult := (__Instance as IsrvLogin).UpdateUsers(UsersDelta);

    __Message.Initialize(__Transport, 'VARELA', 'srvLogin', 'UpdateUsersResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(UsersDelta);
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

{ TsrvVentasTerminadas_Invoker }

procedure TsrvVentasTerminadas_Invoker.Invoke_GetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary; }
var
  DatasetName: String;
  MaxRecords: Integer;
  Columns: String;
  Params: DataAbstract_Intf.TDADatasetParamArray;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  Params := nil;
  lResult := nil;
  try
    __Message.Read('DatasetName', TypeInfo(String), DatasetName, []);
    __Message.Read('MaxRecords', TypeInfo(Integer), MaxRecords, []);
    __Message.Read('Columns', TypeInfo(String), Columns, []);
    __Message.Read('Params', TypeInfo(DataAbstract_Intf.TDADatasetParamArray), Params, []);

    lResult := (__Instance as IsrvVentasTerminadas).GetData(DatasetName, MaxRecords, Columns, Params);

    __Message.Initialize(__Transport, 'VARELA', 'srvVentasTerminadas', 'GetDataResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(Params);
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvVentasTerminadas_Invoker.Invoke_GetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetSchema(const DatasetName: String; const Columns: String): Binary; }
var
  DatasetName: String;
  Columns: String;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  lResult := nil;
  try
    __Message.Read('DatasetName', TypeInfo(String), DatasetName, []);
    __Message.Read('Columns', TypeInfo(String), Columns, []);

    lResult := (__Instance as IsrvVentasTerminadas).GetSchema(DatasetName, Columns);

    __Message.Initialize(__Transport, 'VARELA', 'srvVentasTerminadas', 'GetSchemaResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvVentasTerminadas_Invoker.Invoke_GetDataCrossTab(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetDataCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary; }
var
  FechaIni: String;
  FechaFin: String;
  Coleccion: String;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  lResult := nil;
  try
    __Message.Read('FechaIni', TypeInfo(String), FechaIni, []);
    __Message.Read('FechaFin', TypeInfo(String), FechaFin, []);
    __Message.Read('Coleccion', TypeInfo(String), Coleccion, []);

    lResult := (__Instance as IsrvVentasTerminadas).GetDataCrossTab(FechaIni, FechaFin, Coleccion);

    __Message.Initialize(__Transport, 'VARELA', 'srvVentasTerminadas', 'GetDataCrossTabResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvVentasTerminadas_Invoker.Invoke_GetSchemaCrossTab(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetSchemaCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary; }
var
  FechaIni: String;
  FechaFin: String;
  Coleccion: String;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  lResult := nil;
  try
    __Message.Read('FechaIni', TypeInfo(String), FechaIni, []);
    __Message.Read('FechaFin', TypeInfo(String), FechaFin, []);
    __Message.Read('Coleccion', TypeInfo(String), Coleccion, []);

    lResult := (__Instance as IsrvVentasTerminadas).GetSchemaCrossTab(FechaIni, FechaFin, Coleccion);

    __Message.Initialize(__Transport, 'VARELA', 'srvVentasTerminadas', 'GetSchemaCrossTabResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

{ TsrvTransfereciaFicheros_Invoker }

procedure TsrvTransfereciaFicheros_Invoker.Invoke_UploadChunk(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure UploadChunk(const IsFirst: Boolean; const Filename: String; const Filedata: Binary); }
var
  IsFirst: Boolean;
  Filename: String;
  Filedata: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  Filedata := nil;
  try
    __Message.Read('IsFirst', TypeInfo(Boolean), IsFirst, []);
    __Message.Read('Filename', TypeInfo(String), Filename, []);
    __Message.Read('Filedata', TypeInfo(Binary), Filedata, []);

    (__Instance as IsrvTransfereciaFicheros).UploadChunk(IsFirst, Filename, Filedata);

    __Message.Initialize(__Transport, 'VARELA', 'srvTransfereciaFicheros', 'UploadChunkResponse');
    __Message.Finalize;

    __oResponseOptions := [roNoResponse];

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(Filedata);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvTransfereciaFicheros_Invoker.Invoke_UploadFinished(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure UploadFinished(const Filename: String; const Filesize: Int64); }
var
  Filename: String;
  Filesize: Int64;
begin
  try
    __Message.Read('Filename', TypeInfo(String), Filename, []);
    __Message.Read('Filesize', TypeInfo(Int64), Filesize, []);

    (__Instance as IsrvTransfereciaFicheros).UploadFinished(Filename, Filesize);

    __Message.Initialize(__Transport, 'VARELA', 'srvTransfereciaFicheros', 'UploadFinishedResponse');
    __Message.Finalize;

    __oResponseOptions := [roNoResponse];

  finally
  end;
end;

{ TsrvVentasEnProceso_Invoker }

procedure TsrvVentasEnProceso_Invoker.Invoke_GetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary; }
var
  DatasetName: String;
  MaxRecords: Integer;
  Columns: String;
  Params: DataAbstract_Intf.TDADatasetParamArray;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  Params := nil;
  lResult := nil;
  try
    __Message.Read('DatasetName', TypeInfo(String), DatasetName, []);
    __Message.Read('MaxRecords', TypeInfo(Integer), MaxRecords, []);
    __Message.Read('Columns', TypeInfo(String), Columns, []);
    __Message.Read('Params', TypeInfo(DataAbstract_Intf.TDADatasetParamArray), Params, []);

    lResult := (__Instance as IsrvVentasEnProceso).GetData(DatasetName, MaxRecords, Columns, Params);

    __Message.Initialize(__Transport, 'VARELA', 'srvVentasEnProceso', 'GetDataResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(Params);
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvVentasEnProceso_Invoker.Invoke_GetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetSchema(const DatasetName: String; const Columns: String): Binary; }
var
  DatasetName: String;
  Columns: String;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  lResult := nil;
  try
    __Message.Read('DatasetName', TypeInfo(String), DatasetName, []);
    __Message.Read('Columns', TypeInfo(String), Columns, []);

    lResult := (__Instance as IsrvVentasEnProceso).GetSchema(DatasetName, Columns);

    __Message.Initialize(__Transport, 'VARELA', 'srvVentasEnProceso', 'GetSchemaResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

{ TEDI_Log_Invoker }

procedure TEDI_Log_Invoker.Invoke_InsertarLog(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure InsertarLog(const Fecha: DateTime; const Report: String; const OK: Boolean; const Error_msg: String); }
var
  Fecha: DateTime;
  Report: String;
  OK: Boolean;
  Error_msg: String;
begin
  try
    __Message.Read('Fecha', TypeInfo(DateTime), Fecha, [paIsDateTime]);
    __Message.Read('Report', TypeInfo(String), Report, []);
    __Message.Read('OK', TypeInfo(Boolean), OK, []);
    __Message.Read('Error_msg', TypeInfo(String), Error_msg, []);

    (__Instance as IEDI_Log).InsertarLog(Fecha, Report, OK, Error_msg);

    __Message.Initialize(__Transport, 'VARELA', 'EDI_Log', 'InsertarLogResponse');
    __Message.Finalize;

    __oResponseOptions := [roNoResponse];

  finally
  end;
end;

{ TsrvReferenciaGenerica_Invoker }

procedure TsrvReferenciaGenerica_Invoker.Invoke_GetProducto(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetProducto(const Codigo: String; const Talla: String; const Color: String; out CodigoBarras: String; out Descripcion: String): Boolean; }
var
  Codigo: String;
  Talla: String;
  Color: String;
  CodigoBarras: String;
  Descripcion: String;
  lResult: Boolean;
begin
  try
    __Message.Read('Codigo', TypeInfo(String), Codigo, []);
    __Message.Read('Talla', TypeInfo(String), Talla, []);
    __Message.Read('Color', TypeInfo(String), Color, []);

    lResult := (__Instance as IsrvReferenciaGenerica).GetProducto(Codigo, Talla, Color, CodigoBarras, Descripcion);

    __Message.Initialize(__Transport, 'VARELA', 'srvReferenciaGenerica', 'GetProductoResponse');
    __Message.Write('Result', TypeInfo(Boolean), lResult, []);
    __Message.Write('CodigoBarras', TypeInfo(String), CodigoBarras, []);
    __Message.Write('Descripcion', TypeInfo(String), Descripcion, []);
    __Message.Finalize;

  finally
  end;
end;

procedure TsrvReferenciaGenerica_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GenerateReport(const Centro: String; const Vendedor: String; const Estado: String; const FiltroUsuario: String): Binary; }
var
  Centro: String;
  Vendedor: String;
  Estado: String;
  FiltroUsuario: String;
  lResult: Binary;
  __lObjectDisposer: TROObjectDisposer;
begin
  lResult := nil;
  try
    __Message.Read('Centro', TypeInfo(String), Centro, []);
    __Message.Read('Vendedor', TypeInfo(String), Vendedor, []);
    __Message.Read('Estado', TypeInfo(String), Estado, []);
    __Message.Read('FiltroUsuario', TypeInfo(String), FiltroUsuario, []);

    lResult := (__Instance as IsrvReferenciaGenerica).GenerateReport(Centro, Vendedor, Estado, FiltroUsuario);

    __Message.Initialize(__Transport, 'VARELA', 'srvReferenciaGenerica', 'GenerateReportResponse');
    __Message.Write('Result', TypeInfo(Binary), lResult, []);
    __Message.Finalize;

  finally
    __lObjectDisposer := TROObjectDisposer.Create(__Instance);
    try
      __lObjectDisposer.Add(lResult);
    finally
      __lObjectDisposer.Free();
    end;
  end;
end;

procedure TsrvReferenciaGenerica_Invoker.Invoke_PasarProductosAEspera(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure PasarProductosAEspera(const Centro: String; const Vendedor: String); }
var
  Centro: String;
  Vendedor: String;
begin
  try
    __Message.Read('Centro', TypeInfo(String), Centro, []);
    __Message.Read('Vendedor', TypeInfo(String), Vendedor, []);

    (__Instance as IsrvReferenciaGenerica).PasarProductosAEspera(Centro, Vendedor);

    __Message.Initialize(__Transport, 'VARELA', 'srvReferenciaGenerica', 'PasarProductosAEsperaResponse');
    __Message.Finalize;

    __oResponseOptions := [roNoResponse];

  finally
  end;
end;

end.
