Bonjour

Je voudrais transmettre par un Webservice une structure composée comme ci-dessous

INFO_AGENT
NOM_PRENOM de type string
LIB_AGENCE de type string
PORTEFEUILLE de type array of ENR

avec

ENR
NUM_CLIENT integer
DESIGNATION : string
QUALITE : string

j'ai écrit le source suivant mais ça ne passe pas à la compil

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
unit TestIOIntf;
 
interface
 
uses InvokeRegistry, Types, XSBuiltIns;
 
type
  // Description de la structure ENR
  Enr = Class;
 
  Enr = Class(TRemotable)
  private
    FNum_client  : integer;
    FDesignation : widestring;
    FQualite     : Widestring;
  published
    property Num_client  : integer    read FNum_client  write FNum_client;
    property Designation : widestring read FDesignation write Fdesignation;
    property Qualite     : widestring read FQualite     write FQualite;
  end;
 
 
  Info_Agent = class
 
  Info_Agent = Class(TRemotable)
  private
    FNom_Prenom : widestring;
    FLib_Agence : widestring;
    FPortefeuille : array of Enr;
  published
    property Nom_Prenom   : widestring   read FNom_Prenom   write FNom_Prenom;
    property Lib_Agence   : widestring   read FLib_Agence   write FLib_Agence;
    property Portefeuille : array of Enr read FPortefeuille write FPortefeuille;
 
 
  { Les interfaces invocables doivent dériver de IInvokable }
  ITestIO = interface(IInvokable)
  ['{7BA0A86E-0CCC-42F1-9828-F8EDE440CBE1}']
 
 
  function Lit_Portefeuille(Code_agent : integer) : Portefeuille ; stdcall;
 
 
    { Les méthodes de l'interface invocable ne doivent pas utiliser la convention }
    { d'appel par défaut ; stdcall est conseillée }
  end;
 
implementation
 
initialization
  { Les interfaces invocables doivent être recensées }
  InvRegistry.RegisterInterface(TypeInfo(ITestIO));
 
end.
Je débute en Delphi et je bute sur ce genre de déclaration

Est-ce quelqu'un aurait une idée ?

Merci d'avance