GARANTIR DESCONTO

Fórum Consumir WebService em Delphi 7 #407321

03/09/2011

0

Olá à todos,

Estou com um problemas para consumir um webservice em java. Fiz a atualização do delphi 7, ele importa certo o WSDL não gera nem um erro e tudo certo. O problema é quando vou utilizar tipo array. Quando mando retornar do webservice um tipo simples(um string ou integer) o retorno ocorre tudo certo, mas quando mando retornar uma lista, a lista retorna vazia. Abaixo segue o arquivo gerado. Já utilizei o debug, o webservice localiza os dados e gera o XML corretamente. O problema está em tratar isso no delphi.

Desde já agradeço a atenção

 
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://localhost:8080/SDE_Digitus/SdeEndPoint?WSDL
//  >Import : http://localhost:8080/SDE_Digitus/SdeEndPoint?WSDL:0
//  >Import : http://localhost:8080/SDE_Digitus/SdeEndPoint?xsd=1
// Encoding : UTF-8
// Version  : 1.0
// (03/09/2011 12:02:14 - - $Rev: 10138 $)
// ************************************************************************ //

unit SdeEndPoint1;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

const
  IS_OPTN = $0001;
  IS_UNBD = $0002;
  IS_UNQL = $0008;


type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Borland types; however, they could also 
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:int             - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:boolean         - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:dateTime        - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:base64Binary    - "http://www.w3.org/2001/XMLSchema"[Gbl]

  tipoDocumento        = class;                 { "http://ws.digitus.com.br/"[GblCplx] }
  Exception            = class;                 { "http://ws.digitus.com.br/"[Flt][GblCplx] }
  permissao            = class;                 { "http://ws.digitus.com.br/"[GblCplx] }
  permissaoUsuario     = class;                 { "http://ws.digitus.com.br/"[GblCplx] }
  usuario              = class;                 { "http://ws.digitus.com.br/"[GblCplx] }
  grupoDocumentoUsuario = class;                { "http://ws.digitus.com.br/"[GblCplx] }
  documento            = class;                 { "http://ws.digitus.com.br/"[GblCplx] }
  grupoDocumento       = class;                 { "http://ws.digitus.com.br/"[GblCplx] }
  Exception2           = class;                 { "http://ws.digitus.com.br/"[Flt][GblElm] }
  return               = class;                 { "http://ws.digitus.com.br/"[Alias] }
  return2              = class;                 { "http://ws.digitus.com.br/"[Alias] }
  return3              = class;                 { "http://ws.digitus.com.br/"[Alias] }
  return4              = class;                 { "http://ws.digitus.com.br/"[Alias] }
  return5              = class;                 { "http://ws.digitus.com.br/"[Alias] }
  return6              = class;                 { "http://ws.digitus.com.br/"[Alias] }



  // ************************************************************************ //
  // XML       : tipoDocumento, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  tipoDocumento = class(TRemotable)
  private
    Fdescricao: WideString;
    Fdescricao_Specified: boolean;
    Fidsistema: Integer;
    Fidsistema_Specified: boolean;
    Fidtipodocumento: Integer;
    Fidtipodocumento_Specified: boolean;
    procedure Setdescricao(Index: Integer; const AWideString: WideString);
    function  descricao_Specified(Index: Integer): boolean;
    procedure Setidsistema(Index: Integer; const AInteger: Integer);
    function  idsistema_Specified(Index: Integer): boolean;
    procedure Setidtipodocumento(Index: Integer; const AInteger: Integer);
    function  idtipodocumento_Specified(Index: Integer): boolean;
  published
    property descricao:       WideString  Index (IS_OPTN or IS_UNQL) read Fdescricao write Setdescricao stored descricao_Specified;
    property idsistema:       Integer     Index (IS_OPTN or IS_UNQL) read Fidsistema write Setidsistema stored idsistema_Specified;
    property idtipodocumento: Integer     Index (IS_OPTN or IS_UNQL) read Fidtipodocumento write Setidtipodocumento stored idtipodocumento_Specified;
  end;



  // ************************************************************************ //
  // XML       : Exception, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // Info      : Fault
  // ************************************************************************ //
  Exception = class(ERemotableException)
  private
    Fmessage_: WideString;
    Fmessage__Specified: boolean;
    procedure Setmessage_(Index: Integer; const AWideString: WideString);
    function  message__Specified(Index: Integer): boolean;
  published
    property message_: WideString  Index (IS_OPTN or IS_UNQL) read Fmessage_ write Setmessage_ stored message__Specified;
  end;



  // ************************************************************************ //
  // XML       : permissao, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  permissao = class(TRemotable)
  private
    Fdescricao: WideString;
    Fdescricao_Specified: boolean;
    Fidpermissao: Integer;
    Fidpermissao_Specified: boolean;
    procedure Setdescricao(Index: Integer; const AWideString: WideString);
    function  descricao_Specified(Index: Integer): boolean;
    procedure Setidpermissao(Index: Integer; const AInteger: Integer);
    function  idpermissao_Specified(Index: Integer): boolean;
  published
    property descricao:   WideString  Index (IS_OPTN or IS_UNQL) read Fdescricao write Setdescricao stored descricao_Specified;
    property idpermissao: Integer     Index (IS_OPTN or IS_UNQL) read Fidpermissao write Setidpermissao stored idpermissao_Specified;
  end;



  // ************************************************************************ //
  // XML       : permissaoUsuario, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  permissaoUsuario = class(TRemotable)
  private
    Fidpermissao: Integer;
    Fidpermissao_Specified: boolean;
    Fidusuario: Integer;
    Fidusuario_Specified: boolean;
    procedure Setidpermissao(Index: Integer; const AInteger: Integer);
    function  idpermissao_Specified(Index: Integer): boolean;
    procedure Setidusuario(Index: Integer; const AInteger: Integer);
    function  idusuario_Specified(Index: Integer): boolean;
  published
    property idpermissao: Integer  Index (IS_OPTN or IS_UNQL) read Fidpermissao write Setidpermissao stored idpermissao_Specified;
    property idusuario:   Integer  Index (IS_OPTN or IS_UNQL) read Fidusuario write Setidusuario stored idusuario_Specified;
  end;



  // ************************************************************************ //
  // XML       : usuario, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  usuario = class(TRemotable)
  private
    Fhabilitado: Boolean;
    Fhabilitado_Specified: boolean;
    Fidsistema: Integer;
    Fidsistema_Specified: boolean;
    Fidusuario: Integer;
    Fidusuario_Specified: boolean;
    Flogin: WideString;
    Flogin_Specified: boolean;
    Fnomeusuario: WideString;
    Fnomeusuario_Specified: boolean;
    Fsenha: WideString;
    Fsenha_Specified: boolean;
    procedure Sethabilitado(Index: Integer; const ABoolean: Boolean);
    function  habilitado_Specified(Index: Integer): boolean;
    procedure Setidsistema(Index: Integer; const AInteger: Integer);
    function  idsistema_Specified(Index: Integer): boolean;
    procedure Setidusuario(Index: Integer; const AInteger: Integer);
    function  idusuario_Specified(Index: Integer): boolean;
    procedure Setlogin(Index: Integer; const AWideString: WideString);
    function  login_Specified(Index: Integer): boolean;
    procedure Setnomeusuario(Index: Integer; const AWideString: WideString);
    function  nomeusuario_Specified(Index: Integer): boolean;
    procedure Setsenha(Index: Integer; const AWideString: WideString);
    function  senha_Specified(Index: Integer): boolean;
  published
    property habilitado:  Boolean     Index (IS_OPTN or IS_UNQL) read Fhabilitado write Sethabilitado stored habilitado_Specified;
    property idsistema:   Integer     Index (IS_OPTN or IS_UNQL) read Fidsistema write Setidsistema stored idsistema_Specified;
    property idusuario:   Integer     Index (IS_OPTN or IS_UNQL) read Fidusuario write Setidusuario stored idusuario_Specified;
    property login:       WideString  Index (IS_OPTN or IS_UNQL) read Flogin write Setlogin stored login_Specified;
    property nomeusuario: WideString  Index (IS_OPTN or IS_UNQL) read Fnomeusuario write Setnomeusuario stored nomeusuario_Specified;
    property senha:       WideString  Index (IS_OPTN or IS_UNQL) read Fsenha write Setsenha stored senha_Specified;
  end;



  // ************************************************************************ //
  // XML       : grupoDocumentoUsuario, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  grupoDocumentoUsuario = class(TRemotable)
  private
    Fidgrupodocumento: Integer;
    Fidgrupodocumento_Specified: boolean;
    Fidusuario: Integer;
    Fidusuario_Specified: boolean;
    procedure Setidgrupodocumento(Index: Integer; const AInteger: Integer);
    function  idgrupodocumento_Specified(Index: Integer): boolean;
    procedure Setidusuario(Index: Integer; const AInteger: Integer);
    function  idusuario_Specified(Index: Integer): boolean;
  published
    property idgrupodocumento: Integer  Index (IS_OPTN or IS_UNQL) read Fidgrupodocumento write Setidgrupodocumento stored idgrupodocumento_Specified;
    property idusuario:        Integer  Index (IS_OPTN or IS_UNQL) read Fidusuario write Setidusuario stored idusuario_Specified;
  end;



  // ************************************************************************ //
  // XML       : documento, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  documento = class(TRemotable)
  private
    Fdataalteracao: TXSDateTime;
    Fdataalteracao_Specified: boolean;
    Fdatacadastro: TXSDateTime;
    Fdatacadastro_Specified: boolean;
    Fdatavisualizacao: TXSDateTime;
    Fdatavisualizacao_Specified: boolean;
    Fdescricao: WideString;
    Fdescricao_Specified: boolean;
    Fdocumento: TByteDynArray;
    Fdocumento_Specified: boolean;
    Fiddocumento: Integer;
    Fiddocumento_Specified: boolean;
    Fidgrupodocumento: Integer;
    Fidtipodocumento: Integer;
    Focrdoc: WideString;
    Focrdoc_Specified: boolean;
    Fpalavrachave: WideString;
    Fpalavrachave_Specified: boolean;
    procedure Setdataalteracao(Index: Integer; const ATXSDateTime: TXSDateTime);
    function  dataalteracao_Specified(Index: Integer): boolean;
    procedure Setdatacadastro(Index: Integer; const ATXSDateTime: TXSDateTime);
    function  datacadastro_Specified(Index: Integer): boolean;
    procedure Setdatavisualizacao(Index: Integer; const ATXSDateTime: TXSDateTime);
    function  datavisualizacao_Specified(Index: Integer): boolean;
    procedure Setdescricao(Index: Integer; const AWideString: WideString);
    function  descricao_Specified(Index: Integer): boolean;
    procedure Setdocumento(Index: Integer; const ATByteDynArray: TByteDynArray);
    function  documento_Specified(Index: Integer): boolean;
    procedure Setiddocumento(Index: Integer; const AInteger: Integer);
    function  iddocumento_Specified(Index: Integer): boolean;
    procedure Setocrdoc(Index: Integer; const AWideString: WideString);
    function  ocrdoc_Specified(Index: Integer): boolean;
    procedure Setpalavrachave(Index: Integer; const AWideString: WideString);
    function  palavrachave_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property dataalteracao:    TXSDateTime    Index (IS_OPTN or IS_UNQL) read Fdataalteracao write Setdataalteracao stored dataalteracao_Specified;
    property datacadastro:     TXSDateTime    Index (IS_OPTN or IS_UNQL) read Fdatacadastro write Setdatacadastro stored datacadastro_Specified;
    property datavisualizacao: TXSDateTime    Index (IS_OPTN or IS_UNQL) read Fdatavisualizacao write Setdatavisualizacao stored datavisualizacao_Specified;
    property descricao:        WideString     Index (IS_OPTN or IS_UNQL) read Fdescricao write Setdescricao stored descricao_Specified;
    property documento:        TByteDynArray  Index (IS_OPTN or IS_UNQL) read Fdocumento write Setdocumento stored documento_Specified;
    property iddocumento:      Integer        Index (IS_OPTN or IS_UNQL) read Fiddocumento write Setiddocumento stored iddocumento_Specified;
    property idgrupodocumento: Integer        Index (IS_UNQL) read Fidgrupodocumento write Fidgrupodocumento;
    property idtipodocumento:  Integer        Index (IS_UNQL) read Fidtipodocumento write Fidtipodocumento;
    property ocrdoc:           WideString     Index (IS_OPTN or IS_UNQL) read Focrdoc write Setocrdoc stored ocrdoc_Specified;
    property palavrachave:     WideString     Index (IS_OPTN or IS_UNQL) read Fpalavrachave write Setpalavrachave stored palavrachave_Specified;
  end;



  // ************************************************************************ //
  // XML       : grupoDocumento, global, <complexType>
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  grupoDocumento = class(TRemotable)
  private
    Fdescricao: WideString;
    Fdescricao_Specified: boolean;
    Fidgrupodocumento: Integer;
    Fidgrupodocumento_Specified: boolean;
    Fidsistema: Integer;
    Fidsistema_Specified: boolean;
    procedure Setdescricao(Index: Integer; const AWideString: WideString);
    function  descricao_Specified(Index: Integer): boolean;
    procedure Setidgrupodocumento(Index: Integer; const AInteger: Integer);
    function  idgrupodocumento_Specified(Index: Integer): boolean;
    procedure Setidsistema(Index: Integer; const AInteger: Integer);
    function  idsistema_Specified(Index: Integer): boolean;
  published
    property descricao:        WideString  Index (IS_OPTN or IS_UNQL) read Fdescricao write Setdescricao stored descricao_Specified;
    property idgrupodocumento: Integer     Index (IS_OPTN or IS_UNQL) read Fidgrupodocumento write Setidgrupodocumento stored idgrupodocumento_Specified;
    property idsistema:        Integer     Index (IS_OPTN or IS_UNQL) read Fidsistema write Setidsistema stored idsistema_Specified;
  end;



  // ************************************************************************ //
  // XML       : Exception, global, <element>
  // Namespace : http://ws.digitus.com.br/
  // Info      : Fault
  // ************************************************************************ //
  Exception2 = class(Exception)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : return, alias
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  return = class(permissaoUsuario)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : return, alias
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  return2 = class(permissao)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : return, alias
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  return3 = class(tipoDocumento)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : return, alias
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  return4 = class(grupoDocumento)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : return, alias
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  return5 = class(documento)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : return, alias
  // Namespace : http://ws.digitus.com.br/
  // ************************************************************************ //
  return6 = class(grupoDocumentoUsuario)
  private
  published
  end;

  Array_Of_permissao = array of permissao;      { "http://ws.digitus.com.br/"[GblUbnd] }
  Array_Of_documento = array of documento;      { "http://ws.digitus.com.br/"[GblUbnd] }
  Array_Of_grupoDocumento = array of grupoDocumento;   { "http://ws.digitus.com.br/"[GblUbnd] }
  Array_Of_tipoDocumento = array of tipoDocumento;   { "http://ws.digitus.com.br/"[GblUbnd] }
  Array_Of_grupoDocumentoUsuario = array of grupoDocumentoUsuario;   { "http://ws.digitus.com.br/"[GblUbnd] }
  Array_Of_permissaoUsuario = array of permissaoUsuario;   { "http://ws.digitus.com.br/"[GblUbnd] }

  // ************************************************************************ //
  // Namespace : http://ws.digitus.com.br/
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // binding   : SdeEndPointPortBinding
  // service   : SdeEndPoint
  // port      : SdeEndPointPort
  // URL       : http://localhost:8080/SDE_Digitus/SdeEndPoint
  // ************************************************************************ //
  SdeEndPoint = interface(IInvokable)
  ['{0C8AADB9-9D28-9BFE-FDD0-1240BC3ACEAD}']
    function  AutenticarUsuario(const login: WideString; const senha: WideString): usuario; stdcall;
    function  InserirUsuarios(const usuario: usuario): Boolean; stdcall;
    function  AlterarUsuarios(const usuario: usuario): Boolean; stdcall;
    function  ExcluirUsuarios(const usuario: usuario): Boolean; stdcall;
    function  InserirPermissoes(const permissao: permissao): Boolean; stdcall;
    function  AlterarPermissoes(const permissao: permissao): Boolean; stdcall;
    function  ExcluirPermissoes(const permissao: permissao): Boolean; stdcall;
    function  LocalizarPermissoes(const IdPermissao: Integer): Array_Of_permissao; stdcall;
    function  InserirDocumentos(const documento: documento): Boolean; stdcall;
    function  AlterarDocumentos(const documento: documento): Boolean; stdcall;
    function  ExcluirDocumentos(const documento: documento): Boolean; stdcall;
    function  LocalizarDocumentos(const descricao: WideString; const ocrdoc: WideString; const datacadastroinicial: TXSDateTime; const datacadastrofinal: TXSDateTime; const palavrachave: WideString; const idgrupodocumento: Integer; 
                                  const idsistema: Integer): Array_Of_documento; stdcall;
    function  InserirGrupoDocumentos(const grupodocumento: grupoDocumento): Boolean; stdcall;
    function  AlterarGrupoDocumentos(const grupodocumento: grupoDocumento): Boolean; stdcall;
    function  ExcluirGrupoDocumentos(const grupodocumento: grupoDocumento): Boolean; stdcall;
    function  LocalizarGrupoDocumentos(const idsistema: Integer): Array_Of_grupoDocumento; stdcall;
    function  InserirTipoDocumentos(const tipodocumento: tipoDocumento): Boolean; stdcall;
    function  AlterarTipoDocumentos(const tipodocumento: tipoDocumento): Boolean; stdcall;
    function  ExcluirTipoDocumentos(const tipodocumento: tipoDocumento): Boolean; stdcall;
    function  LocalizarTipoDocumentos(const idsistema: Integer): Array_Of_tipoDocumento; stdcall;
    function  InserirGrupoDocumentoUsuarios(const grupodocumentousuario: grupoDocumentoUsuario): Boolean; stdcall;
    function  AlterarGrupoDocumentoUsuarios(const grupodocumentousuario: grupoDocumentoUsuario): Boolean; stdcall;
    function  ExcluirGrupoDocumentoUsuarios(const grupodocumentousuario: grupoDocumentoUsuario): Boolean; stdcall;
    function  LocalizarGrupoDocumentoUsuarios(const idusuario: Integer): Array_Of_grupoDocumentoUsuario; stdcall;
    function  InserirPermissaoUsuarios(const permissaousuario: permissaoUsuario): Boolean; stdcall;
    function  AlterarPermissaoUsuarios(const permissaousuario: permissaoUsuario): Boolean; stdcall;
    function  ExcluirPermissaoUsuarios(const permissaousuario: permissaoUsuario): Boolean; stdcall;
    function  LocalizarPermissaoUsuarios(const idusuario: Integer): Array_Of_permissaoUsuario; stdcall;
  end;

function GetSdeEndPoint(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): SdeEndPoint;


implementation
  uses SysUtils;

function GetSdeEndPoint(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): SdeEndPoint;
const
  defWSDL = 'http://localhost:8080/SDE_Digitus/SdeEndPoint?WSDL';
  defURL  = 'http://localhost:8080/SDE_Digitus/SdeEndPoint';
  defSvc  = 'SdeEndPoint';
  defPrt  = 'SdeEndPointPort';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as SdeEndPoint);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;


procedure tipoDocumento.Setdescricao(Index: Integer; const AWideString: WideString);
begin
  Fdescricao := AWideString;
  Fdescricao_Specified := True;
end;

function tipoDocumento.descricao_Specified(Index: Integer): boolean;
begin
  Result := Fdescricao_Specified;
end;

procedure tipoDocumento.Setidsistema(Index: Integer; const AInteger: Integer);
begin
  Fidsistema := AInteger;
  Fidsistema_Specified := True;
end;

function tipoDocumento.idsistema_Specified(Index: Integer): boolean;
begin
  Result := Fidsistema_Specified;
end;

procedure tipoDocumento.Setidtipodocumento(Index: Integer; const AInteger: Integer);
begin
  Fidtipodocumento := AInteger;
  Fidtipodocumento_Specified := True;
end;

function tipoDocumento.idtipodocumento_Specified(Index: Integer): boolean;
begin
  Result := Fidtipodocumento_Specified;
end;

procedure Exception.Setmessage_(Index: Integer; const AWideString: WideString);
begin
  Fmessage_ := AWideString;
  Fmessage__Specified := True;
end;

function Exception.message__Specified(Index: Integer): boolean;
begin
  Result := Fmessage__Specified;
end;

procedure permissao.Setdescricao(Index: Integer; const AWideString: WideString);
begin
  Fdescricao := AWideString;
  Fdescricao_Specified := True;
end;

function permissao.descricao_Specified(Index: Integer): boolean;
begin
  Result := Fdescricao_Specified;
end;

procedure permissao.Setidpermissao(Index: Integer; const AInteger: Integer);
begin
  Fidpermissao := AInteger;
  Fidpermissao_Specified := True;
end;

function permissao.idpermissao_Specified(Index: Integer): boolean;
begin
  Result := Fidpermissao_Specified;
end;

procedure permissaoUsuario.Setidpermissao(Index: Integer; const AInteger: Integer);
begin
  Fidpermissao := AInteger;
  Fidpermissao_Specified := True;
end;

function permissaoUsuario.idpermissao_Specified(Index: Integer): boolean;
begin
  Result := Fidpermissao_Specified;
end;

procedure permissaoUsuario.Setidusuario(Index: Integer; const AInteger: Integer);
begin
  Fidusuario := AInteger;
  Fidusuario_Specified := True;
end;

function permissaoUsuario.idusuario_Specified(Index: Integer): boolean;
begin
  Result := Fidusuario_Specified;
end;

procedure usuario.Sethabilitado(Index: Integer; const ABoolean: Boolean);
begin
  Fhabilitado := ABoolean;
  Fhabilitado_Specified := True;
end;

function usuario.habilitado_Specified(Index: Integer): boolean;
begin
  Result := Fhabilitado_Specified;
end;

procedure usuario.Setidsistema(Index: Integer; const AInteger: Integer);
begin
  Fidsistema := AInteger;
  Fidsistema_Specified := True;
end;

function usuario.idsistema_Specified(Index: Integer): boolean;
begin
  Result := Fidsistema_Specified;
end;

procedure usuario.Setidusuario(Index: Integer; const AInteger: Integer);
begin
  Fidusuario := AInteger;
  Fidusuario_Specified := True;
end;

function usuario.idusuario_Specified(Index: Integer): boolean;
begin
  Result := Fidusuario_Specified;
end;

procedure usuario.Setlogin(Index: Integer; const AWideString: WideString);
begin
  Flogin := AWideString;
  Flogin_Specified := True;
end;

function usuario.login_Specified(Index: Integer): boolean;
begin
  Result := Flogin_Specified;
end;

procedure usuario.Setnomeusuario(Index: Integer; const AWideString: WideString);
begin
  Fnomeusuario := AWideString;
  Fnomeusuario_Specified := True;
end;

function usuario.nomeusuario_Specified(Index: Integer): boolean;
begin
  Result := Fnomeusuario_Specified;
end;

procedure usuario.Setsenha(Index: Integer; const AWideString: WideString);
begin
  Fsenha := AWideString;
  Fsenha_Specified := True;
end;

function usuario.senha_Specified(Index: Integer): boolean;
begin
  Result := Fsenha_Specified;
end;

procedure grupoDocumentoUsuario.Setidgrupodocumento(Index: Integer; const AInteger: Integer);
begin
  Fidgrupodocumento := AInteger;
  Fidgrupodocumento_Specified := True;
end;

function grupoDocumentoUsuario.idgrupodocumento_Specified(Index: Integer): boolean;
begin
  Result := Fidgrupodocumento_Specified;
end;

procedure grupoDocumentoUsuario.Setidusuario(Index: Integer; const AInteger: Integer);
begin
  Fidusuario := AInteger;
  Fidusuario_Specified := True;
end;

function grupoDocumentoUsuario.idusuario_Specified(Index: Integer): boolean;
begin
  Result := Fidusuario_Specified;
end;

destructor documento.Destroy;
begin
  FreeAndNil(Fdataalteracao);
  FreeAndNil(Fdatacadastro);
  FreeAndNil(Fdatavisualizacao);
  inherited Destroy;
end;

procedure documento.Setdataalteracao(Index: Integer; const ATXSDateTime: TXSDateTime);
begin
  Fdataalteracao := ATXSDateTime;
  Fdataalteracao_Specified := True;
end;

function documento.dataalteracao_Specified(Index: Integer): boolean;
begin
  Result := Fdataalteracao_Specified;
end;

procedure documento.Setdatacadastro(Index: Integer; const ATXSDateTime: TXSDateTime);
begin
  Fdatacadastro := ATXSDateTime;
  Fdatacadastro_Specified := True;
end;

function documento.datacadastro_Specified(Index: Integer): boolean;
begin
  Result := Fdatacadastro_Specified;
end;

procedure documento.Setdatavisualizacao(Index: Integer; const ATXSDateTime: TXSDateTime);
begin
  Fdatavisualizacao := ATXSDateTime;
  Fdatavisualizacao_Specified := True;
end;

function documento.datavisualizacao_Specified(Index: Integer): boolean;
begin
  Result := Fdatavisualizacao_Specified;
end;

procedure documento.Setdescricao(Index: Integer; const AWideString: WideString);
begin
  Fdescricao := AWideString;
  Fdescricao_Specified := True;
end;

function documento.descricao_Specified(Index: Integer): boolean;
begin
  Result := Fdescricao_Specified;
end;

procedure documento.Setdocumento(Index: Integer; const ATByteDynArray: TByteDynArray);
begin
  Fdocumento := ATByteDynArray;
  Fdocumento_Specified := True;
end;

function documento.documento_Specified(Index: Integer): boolean;
begin
  Result := Fdocumento_Specified;
end;

procedure documento.Setiddocumento(Index: Integer; const AInteger: Integer);
begin
  Fiddocumento := AInteger;
  Fiddocumento_Specified := True;
end;

function documento.iddocumento_Specified(Index: Integer): boolean;
begin
  Result := Fiddocumento_Specified;
end;

procedure documento.Setocrdoc(Index: Integer; const AWideString: WideString);
begin
  Focrdoc := AWideString;
  Focrdoc_Specified := True;
end;

function documento.ocrdoc_Specified(Index: Integer): boolean;
begin
  Result := Focrdoc_Specified;
end;

procedure documento.Setpalavrachave(Index: Integer; const AWideString: WideString);
begin
  Fpalavrachave := AWideString;
  Fpalavrachave_Specified := True;
end;

function documento.palavrachave_Specified(Index: Integer): boolean;
begin
  Result := Fpalavrachave_Specified;
end;

procedure grupoDocumento.Setdescricao(Index: Integer; const AWideString: WideString);
begin
  Fdescricao := AWideString;
  Fdescricao_Specified := True;
end;

function grupoDocumento.descricao_Specified(Index: Integer): boolean;
begin
  Result := Fdescricao_Specified;
end;

procedure grupoDocumento.Setidgrupodocumento(Index: Integer; const AInteger: Integer);
begin
  Fidgrupodocumento := AInteger;
  Fidgrupodocumento_Specified := True;
end;

function grupoDocumento.idgrupodocumento_Specified(Index: Integer): boolean;
begin
  Result := Fidgrupodocumento_Specified;
end;

procedure grupoDocumento.Setidsistema(Index: Integer; const AInteger: Integer);
begin
  Fidsistema := AInteger;
  Fidsistema_Specified := True;
end;

function grupoDocumento.idsistema_Specified(Index: Integer): boolean;
begin
  Result := Fidsistema_Specified;
end;

initialization
  InvRegistry.RegisterInterface(TypeInfo(SdeEndPoint), 'http://ws.digitus.com.br/', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(SdeEndPoint), '');
  InvRegistry.RegisterInvokeOptions(TypeInfo(SdeEndPoint), ioDocument);
  RemClassRegistry.RegisterXSClass(tipoDocumento, 'http://ws.digitus.com.br/', 'tipoDocumento');
  RemClassRegistry.RegisterXSClass(Exception, 'http://ws.digitus.com.br/', 'Exception');
  RemClassRegistry.RegisterExternalPropName(TypeInfo(Exception), 'message_', 'message');
  RemClassRegistry.RegisterXSClass(permissao, 'http://ws.digitus.com.br/', 'permissao');
  RemClassRegistry.RegisterXSClass(permissaoUsuario, 'http://ws.digitus.com.br/', 'permissaoUsuario');
  RemClassRegistry.RegisterXSClass(usuario, 'http://ws.digitus.com.br/', 'usuario');
  RemClassRegistry.RegisterXSClass(grupoDocumentoUsuario, 'http://ws.digitus.com.br/', 'grupoDocumentoUsuario');
  RemClassRegistry.RegisterXSClass(documento, 'http://ws.digitus.com.br/', 'documento');
  RemClassRegistry.RegisterXSClass(grupoDocumento, 'http://ws.digitus.com.br/', 'grupoDocumento');
  RemClassRegistry.RegisterXSClass(Exception2, 'http://ws.digitus.com.br/', 'Exception2', 'Exception');
  RemClassRegistry.RegisterXSClass(return, 'http://ws.digitus.com.br/', 'return');
  RemClassRegistry.RegisterXSClass(return2, 'http://ws.digitus.com.br/', 'return2', 'return');
  RemClassRegistry.RegisterXSClass(return3, 'http://ws.digitus.com.br/', 'return3', 'return');
  RemClassRegistry.RegisterXSClass(return4, 'http://ws.digitus.com.br/', 'return4', 'return');
  RemClassRegistry.RegisterXSClass(return5, 'http://ws.digitus.com.br/', 'return5', 'return');
  RemClassRegistry.RegisterXSClass(return6, 'http://ws.digitus.com.br/', 'return6', 'return');
  RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_permissao), 'http://ws.digitus.com.br/', 'Array_Of_permissao');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(Array_Of_permissao), [xoInlineArrays]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_documento), 'http://ws.digitus.com.br/', 'Array_Of_documento');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(Array_Of_documento), [xoInlineArrays]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_grupoDocumento), 'http://ws.digitus.com.br/', 'Array_Of_grupoDocumento');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(Array_Of_grupoDocumento), [xoInlineArrays]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_tipoDocumento), 'http://ws.digitus.com.br/', 'Array_Of_tipoDocumento');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(Array_Of_tipoDocumento), [xoInlineArrays]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_grupoDocumentoUsuario), 'http://ws.digitus.com.br/', 'Array_Of_grupoDocumentoUsuario');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(Array_Of_grupoDocumentoUsuario), [xoInlineArrays]);
  RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_permissaoUsuario), 'http://ws.digitus.com.br/', 'Array_Of_permissaoUsuario');
  RemClassRegistry.RegisterSerializeOptions(TypeInfo(Array_Of_permissaoUsuario), [xoInlineArrays]);
end.

Francisco Araújo

Francisco Araújo

Responder

Posts

04/09/2011

Marco Salles

Talves a atualização do  SOAP wsdl importer resolva. Geralmente a desatualização é responsável por muitos erros


http://marcosalles.wordpress.com/2010/04/20/delp-prism-erro-passagem-parametros-ao-consumir-web-services-com-o-delphi-7/
Responder

Gostei + 0

27/06/2012

Romulo Contro

estou com um problema parecido com isso aí...

to consumindo um webservice em C#, e quando vou enviar/receber um array de objetos, na hora de criar o xml, ele cria uma tag vazia...

a minha importação do WSDL tá semelhante a sua... quando é de tipos normais, String, Int, etc... ele dá certinho, mas quando trata-se de array, ele nao faz certo...

alguem tem alguma sugestão?
Responder

Gostei + 0

05/07/2012

Romulo Contro

BOM DIA!

Informo que passei por esse mesmo problema e descobri a solução...

lá na declaração das funções, ao invés de deixar como FUNCTION, coloca como PROCEDURE, e declara lá dentro variaveis OUT pra receber o retorno...

por exemplo:
procedure ManterTransportadorRequest(const IdentificacaoIntegracao: IdentificacaoIntegracaoType; const Operacao: TipoOperacaoType; const IdClienteResponsavel: Integer; const ListaTransportador: ListaTransportador; out RetornoMensagem: RetornoMensagem; out TranportadorRetorno: TranportadorRetorno); stdcall;

o mesmo funciona com retorno de array.
Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar