Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Custom type definition and MSSoapClient

30 views
Skip to first unread message

Curia Damiano

unread,
Mar 4, 2002, 8:15:14 AM3/4/02
to
I have a SOAP server built in D6.02+IndyApp.
I get an error trying to import it into MSSoap.SoapClient version 2.0.
Here follows the XML of the WSDL, with register custom types derived
from TRemotable (I think the problem is this, as other SOAP server
written in D6.02+IndyApp work with no problem).
Can someone help me?
Thanks, Damiano Curia


<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="IServerServerservice"
targetNamespace="http://www.borland.com/soapServices/"
xmlns:tns="http://www.borland.com/soapServices/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:ServerServerIntf" xmlns:ns2="urn:Market"
xmlns:ns3="urn:mtolTypes">
<types>
<xs:schema targetNamespace="urn:ServerServerIntf"
xmlns="urn:ServerServerIntf">
<xs:complexType name="TAutenticazioneInfo">
<xs:sequence>
<xs:element name="AutentToken"
type="xs:int"/>
<xs:element name="LoginId"
type="xs:string"/>
<xs:element name="ClientIP"
type="xs:string"/>
<xs:element name="ClientPubK"
type="xs:base64Binary"/>
<xs:element name="DesK"
type="xs:base64Binary"/>
<xs:element
name="MustChangePswd" type="xs:boolean"/>
<xs:element name="IsRealClt"
type="xs:boolean"/>
<xs:element name="CanQuote"
type="xs:boolean"/>
<xs:element name="IsGestore"
type="xs:boolean"/>
<xs:element name="EMail"
type="xs:string"/>
<xs:element name="SMS"
type="xs:string"/>
<xs:element name="SMSEnabled"
type="xs:boolean"/>
<xs:element name="RealTime"
type="xs:boolean"/>
<xs:element name="MarketCodes"
type="ns2:ArrayOfTmktCodeType"/>
<xs:element name="Requests"
type="ns1:ArrayOfReqInfo"/>
<xs:element
name="DescrUrlsToClt" type="ns3:ArrayOfString"/>
<xs:element name="UrlsToClt"
type="ns3:ArrayOfString"/>
<xs:element name="AccountList"
type="ns1:ArrayOfAccountInfo"/>
<xs:element
name="AdditionalAccountList" type="ns3:ArrayOfString"/>
<xs:element
name="ConnectionType" type="xs:TConnectionType"/>
<xs:element name="Supervisor"
type="xs:boolean"/>
<xs:element name="MMCode"
type="xs:string"/>
<xs:element
name="ListaProdotti" type="ns3:ArrayOfInteger"/>
<xs:element
name="OperatorGroups" type="ns3:ArrayOfString"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArrayOfReqInfo">
<xs:complexContent>
<xs:restriction
base="soapenc:Array">
<xs:sequence/>
<xs:attribute
ref="soapenc:arrayType" n1:arrayType="ns1:TReqInfo[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ArrayOfAccountInfo">
<xs:complexContent>
<xs:restriction
base="soapenc:Array">
<xs:sequence/>
<xs:attribute
ref="soapenc:arrayType" n1:arrayType="ns1:TAccountInfo[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TReqInfo">
<xs:sequence>
<xs:element name="Codice"
type="xs:int"/>
<xs:element name="Descrizione"
type="xs:string"/>
<xs:element
name="SecondiAttesa" type="xs:int"/>
<xs:element name="Parametri"
type="ns1:ArrayOfReqParam"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArrayOfReqParam">
<xs:complexContent>
<xs:restriction
base="soapenc:Array">
<xs:sequence/>
<xs:attribute
ref="soapenc:arrayType" n1:arrayType="ns1:TReqParam[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TReqParam">
<xs:sequence>
<xs:element name="Descrizione"
type="xs:string"/>
<xs:element name="Tipo"
type="xs:TParamType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TAccountInfo">
<xs:sequence>
<xs:element name="Account"
type="xs:string"/>
<xs:element name="CieName"
type="xs:string"/>
<xs:element name="Status"
type="ns1:TAccountStatus"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TAccountStatus">
<xs:restriction base="xs:string">
<xs:enumeration
value="accClose"/>
<xs:enumeration
value="accPartial"/>
<xs:enumeration
value="accOpen"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<xs:schema targetNamespace="urn:Market"
xmlns="urn:Market">
<xs:complexType name="ArrayOfTmktCodeType">
<xs:complexContent>
<xs:restriction
base="soapenc:Array">
<xs:sequence/>
<xs:attribute
ref="soapenc:arrayType" n1:arrayType="xs:TmktCodeType[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema targetNamespace="urn:mtolTypes"
xmlns="urn:mtolTypes">
<xs:complexType name="ArrayOfString">
<xs:complexContent>
<xs:restriction
base="soapenc:Array">
<xs:sequence/>
<xs:attribute
ref="soapenc:arrayType" n1:arrayType="xs:string[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ArrayOfInteger">
<xs:complexContent>
<xs:restriction
base="soapenc:Array">
<xs:sequence/>
<xs:attribute
ref="soapenc:arrayType" n1:arrayType="xs:int[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
</types>
<message name="GetTimeRequest"/>
<message name="GetTimeResponse">
<part name="return" type="xs:string"/>
</message>
<message name="GetWebSrvAddressRequest"/>
<message name="GetWebSrvAddressResponse">
<part name="return" type="xs:string"/>
</message>
<message name="GetPubKRequest"/>
<message name="GetPubKResponse">
<part name="return" type="xs:base64Binary"/>
</message>
<message name="AutenticazioneRequest">
<part name="LoginId" type="xs:string"/>
<part name="Pswd" type="xs:base64Binary"/>
<part name="ClientPubK" type="xs:base64Binary"/>
<part name="EXEVersion" type="xs:string"/>
</message>
<message name="AutenticazioneResponse">
<part name="return" type="ns1:TAutenticazioneInfo"/>
</message>
<message name="DisconnectClientRequest">
<part name="AutToken" type="xs:int"/>
<part name="Motivo" type="xs:string"/>
<part name="FromClt" type="xs:boolean"/>
</message>
<message name="DisconnectClientResponse"/>
<message name="GetAddresses2TraderRequest">
<part name="AutToken" type="xs:int"/>
<part name="BSAddressLocal" type="xs:string"/>
<part name="BSAddressRemote" type="xs:string"/>
<part name="PSAddressLocal" type="xs:string"/>
<part name="PSAddressRemote" type="xs:string"/>
<part name="BSAddressesLocal"
type="ns3:ArrayOfString"/>
<part name="BSAddressesRemote"
type="ns3:ArrayOfString"/>
<part name="MMSAddressLocal" type="xs:string"/>
<part name="MMSAddressRemote" type="xs:string"/>
</message>
<message name="GetAddresses2TraderResponse">
<part name="BSAddressLocal" type="xs:string"/>
<part name="BSAddressRemote" type="xs:string"/>
<part name="PSAddressLocal" type="xs:string"/>
<part name="PSAddressRemote" type="xs:string"/>
<part name="BSAddressesLocal"
type="ns3:ArrayOfString"/>
<part name="BSAddressesRemote"
type="ns3:ArrayOfString"/>
<part name="MMSAddressLocal" type="xs:string"/>
<part name="MMSAddressRemote" type="xs:string"/>
</message>
<message name="CheckAutenticazioneRequest">
<part name="AutToken" type="xs:int"/>
</message>
<message name="CheckAutenticazioneResponse">
<part name="return" type="ns1:TAutenticazioneInfo"/>
</message>
<message name="ChangeDesKeyRequest">
<part name="AutToken" type="xs:int"/>
<part name="DesK" type="xs:base64Binary"/>
</message>
<message name="ChangeDesKeyResponse"/>
<message name="GetClientsListRequest">
<part name="WantClients" type="xs:boolean"/>
<part name="WantSales" type="xs:boolean"/>
<part name="WantDealers" type="xs:boolean"/>
<part name="Clients" type="ns3:ArrayOfString"/>
<part name="Sales" type="ns3:ArrayOfString"/>
<part name="Dealers" type="ns3:ArrayOfString"/>
</message>
<message name="GetClientsListResponse">
<part name="Clients" type="ns3:ArrayOfString"/>
<part name="Sales" type="ns3:ArrayOfString"/>
<part name="Dealers" type="ns3:ArrayOfString"/>
</message>
<portType name="IServerServer">
<operation name="GetTime">
<input message="tns:GetTimeRequest"/>
<output message="tns:GetTimeResponse"/>
</operation>
<operation name="GetWebSrvAddress">
<input message="tns:GetWebSrvAddressRequest"/>
<output
message="tns:GetWebSrvAddressResponse"/>
</operation>
<operation name="GetPubK">
<input message="tns:GetPubKRequest"/>
<output message="tns:GetPubKResponse"/>
</operation>
<operation name="Autenticazione">
<input message="tns:AutenticazioneRequest"/>
<output message="tns:AutenticazioneResponse"/>
</operation>
<operation name="DisconnectClient">
<input message="tns:DisconnectClientRequest"/>
<output
message="tns:DisconnectClientResponse"/>
</operation>
<operation name="GetAddresses2Trader">
<input
message="tns:GetAddresses2TraderRequest"/>
<output
message="tns:GetAddresses2TraderResponse"/>
</operation>
<operation name="CheckAutenticazione">
<input
message="tns:CheckAutenticazioneRequest"/>
<output
message="tns:CheckAutenticazioneResponse"/>
</operation>
<operation name="ChangeDesKey">
<input message="tns:ChangeDesKeyRequest"/>
<output message="tns:ChangeDesKeyResponse"/>
</operation>
<operation name="GetClientsList">
<input message="tns:GetClientsListRequest"/>
<output message="tns:GetClientsListResponse"/>
</operation>
</portType>
<binding name="IServerServerbinding" type="tns:IServerServer">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetTime">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#GetTime" style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="GetWebSrvAddress">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#GetWebSrvAddress"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="GetPubK">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#GetPubK" style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="Autenticazione">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#Autenticazione"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="DisconnectClient">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#DisconnectClient"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="GetAddresses2Trader">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#GetAddresses2Trader"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="CheckAutenticazione">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#CheckAutenticazione"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="ChangeDesKey">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#ChangeDesKey"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
<operation name="GetClientsList">
<soap:operation
soapAction="urn:ServerServerIntf-IServerServer#GetClientsList"
style="rpc"/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ServerServerIntf-IServerServer"/>
</output>
</operation>
</binding>
<service name="IServerServerservice">
<port name="iserverserverPort"
binding="tns:IServerServerbinding">
<soap:address
location="http://10.0.0.7:8081/soap/iserverserver"/>
</port>
</service>
</definitions>

Jean-Marie Babet

unread,
Mar 4, 2002, 1:53:11 PM3/4/02
to
Curia,

There's something strange about the WSDL:

The types TParamType and TConnectionType are in the 2001 XMLSchema namespace
?? Are you registering those in that namespace or is the SOAP runtime code
tripping somewhere into believing that these are built-in types (i.e.
predefined types of XML Schema 2001).

Anyway, the end result is that the schema makes reference to these two types
but they can't be resolved.

I did not try importing this with the MSST but I suspect that any importer
that validates schemas would fail on this. Can you post the snippets of code
that declare and register TParamType and TConnectionType.

Regards,


Bruneau.


Curia Damiano

unread,
Mar 5, 2002, 3:03:54 AM3/5/02
to
Here follows my unit (the interface one).
Bye, Damiano Curia


{ Invokable interface declaration unit for IServerServer }

unit ServerServerIntf;

interface

uses
Types, InvokeRegistry, mtolTypes, Market, Messaggi;

const
(* Inizio degli indirizzi IP locali. *)
InizioIPLocale='10.0.';

type
(* Descrizione di un parametro di una richiesta di backoffice che
può essere
** fatta dal client. *)
TReqParam=class (TRemotable)
private
FDescrizione:string;
FTipo:TParamType;
published
property Descrizione:string read FDescrizione write FDescrizione;
property Tipo:TParamType read FTipo write FTipo;
public
constructor Create; override;
constructor Clone (AReqParam:TReqParam);
end;
ArrayOfReqParam=array of TReqParam;

(* Possibile richiesta di backoffice che può essere fatta dal
client. *)
TReqInfo=class (TRemotable)
private
FCodice:Integer;
FDescrizione:string;
FSecondiAttesa:Integer;
FParametri:ArrayOfReqParam;
published
property Codice:Integer read FCodice write FCodice;
property Descrizione:string read FDescrizione write FDescrizione;
property SecondiAttesa:Integer read FSecondiAttesa write
FSecondiAttesa;
property Parametri:ArrayOfReqParam read FParametri write
FParametri;
public
constructor Create; override;
constructor Clone (AReqInfo:TReqInfo);
procedure AddReqParam (const Descrizione:string; Tipo:TParamType);
end;
ArrayOfReqInfo=array of TReqInfo;

(* Stato del conto dei clienti: chiuso, aperto parzialmente,
aperto. *)
TAccountStatus=(accClose, accPartial, accOpen);
TAccountInfo=class (TRemotable)
private
FAccount:string;
FCieName:string;
FStatus:TAccountStatus;
published
property Account:string read FAccount write FAccount;
property CieName:string read FCieName write FCieName;
property Status:TAccountStatus read FStatus write FStatus;
public
constructor Create; override;
constructor Clone (AAccountInfo:TAccountInfo);
end;
ArrayOfAccountInfo=array of TAccountInfo;

TAutenticazioneInfo=class (TRemotable)
private
FAutentToken:Integer;
FLoginId:string;
FClientIP:string;
FClientPubK:TByteDynArray;
FDesK:TByteDynArray;
FMustChangePswd:Boolean;
FIsRealClt:Boolean;
FCanQuote:Boolean;
FIsGestore:Boolean;
FEMail, FSMS:string; FSMSEnabled:Boolean;
FRealTime:Boolean;
FMarketCodes:ArrayOfTmktCodeType;
FRequests:ArrayOfReqInfo;
FConnectionType:TConnectionType;
FAccountList:ArrayOfAccountInfo;
FAdditionalAccountList:ArrayOfString;
FOperatorGroups:ArrayOfString;
FDescrUrlsToClt:ArrayOfString;
FUrlsToClt:ArrayOfString;
FSupervisor:Boolean;
FMMCode:string;
FListaProdotti:ArrayOfInteger;
published
property AutentToken:Integer read FAutentToken write FAutentToken;
property LoginId:string read FLoginId write FLoginId;
property ClientIP:string read FClientIP write FClientIP;
property ClientPubK:TByteDynArray read FClientPubK write
FClientPubK;
property DesK:TByteDynArray read FDesK write FDesK;
property MustChangePswd:Boolean read FMustChangePswd write
FMustChangePswd;
property IsRealClt:Boolean read FIsRealClt write FIsRealClt;
property CanQuote:Boolean read FCanQuote write FCanQuote;
property IsGestore:Boolean read FIsGestore write FIsGestore;
property EMail:string read FEmail write FEmail;
property SMS:string read FSMS write FSMS;
property SMSEnabled:Boolean read FSMSEnabled write FSMSEnabled;
property RealTime:Boolean read FRealTime write FRealTime;
property MarketCodes:ArrayOfTmktCodeType read FMarketCodes write
FMarketCodes;
property Requests:ArrayOfReqInfo read FRequests write FRequests;
property DescrUrlsToClt:ArrayOfString read FDescrUrlsToClt write
FDescrUrlsToClt;
property UrlsToClt:ArrayOfString read FUrlsToClt write FUrlsToClt;
property AccountList:ArrayOfAccountInfo read FAccountList write
FAccountList;
property AdditionalAccountList:ArrayOfString read
FAdditionalAccountList write FAdditionalAccountList;
property ConnectionType:TConnectionType read FConnectionType write
FConnectionType;
property Supervisor:Boolean read FSupervisor write FSupervisor;
property MMCode:string read FMMCode write FMMCode;
property ListaProdotti:ArrayOfInteger read FListaProdotti write
FListaProdotti;
property OperatorGroups:ArrayOfString read FOperatorGroups write
FOperatorGroups;
public
constructor Create; override;
constructor Clone (AAutenticazioneInfo:TAutenticazioneInfo);
procedure AddMarketCode (MarketCode:TmktCodeType);
function AddRequest (Codice:Integer; const Descrizione:string;
SecondiAttesa:
Integer):TReqInfo;
procedure AddProduct (ProductCode:Integer);
procedure AddAccount (const Account, CieName:string;
Status:TAccountStatus);
procedure AddAdditionalAccount (const Account:string);
function GetUrl (const Descr:string):string;
procedure AddOperatorGroup (const OperatorGroup:string);

(* Questa funzione ritorna l'elenco con tutti i conti come
ArrayOfString,
** indipendentemente dal loro stato. *)
function GetAccountListAsAOS:ArrayOfString;
end;

IServerServer = interface(IInvokable)
['{7BF9C5F1-8F50-447E-95B9-EEA1F3DDD341}']
// Declare your invokable logic here using standard Object Pascal
code
// Remember to include a calling convention! (usually stdcall)

(* Funzione di prova. *)
function GetTime:string; stdcall;

(* Questa funzione ritorna l'indirizzo del server web. *)
function GetWebSrvAddress:string; stdcall;

(* Questa funzione ritorna la chiave pubblica del server-server.
*)
function GetPubK:TByteDynArray; stdcall;

(* Autenticazione da parte di client e trader.
** La password è criptata con la chiave pubblica del server e
poi zippata.
** Viene restituito in uscita un record di tipo
TAutenticazioneInfo. *)
function Autenticazione (const LoginId:string; Pswd,
ClientPubK:TByteDynArray;
const EXEVersion:string):TAutenticazioneInfo; stdcall;

(* Un cliente si disconnette o un programma server (per esempio
una trader)
** chiede di disconnettere il cliente.
** Se FromClt=True è il cliente che si è disconnesso, altrimenti
il cliente
** è stato disconnesso da un altro programma e quindi bisogna
mandare una
** notifica al cliente stesso. *)
procedure DisconnectClient (AutToken:Integer; const Motivo:string;
FromClt:
Boolean); stdcall;

(* Una trader (come client o come dealer) si connette e chiede
l'indirizzo
** dei server a cui si connette come client (broker-server e,
price-server)
** ed eventualmente come dealer (broker-server, MM-server).
** Per gli altri server, è bene che questi ultimi non usino
questa funzione,
** ma si registrino, in modo da ricevere le notifiche di
cambiamento degli
** indirizzi. *)
procedure GetAddresses2Trader (AutToken:Integer; var
BSAddressLocal,
BSAddressRemote, PSAddressLocal, PSAddressRemote:string; var
BSAddressesLocal,
BSAddressesRemote:ArrayOfString; var MMSAddressLocal,
MMSAddressRemote:string);
stdcall;

(* Questa funzione ritorna l'AutenticazioneInfo associata
all'autorization-
** token AutToken; nel caso in cui AutToken non venga trovata,
viene
** sollevata un'eccezione. *)
function CheckAutenticazione
(AutToken:Integer):TAutenticazioneInfo; stdcall;

(* Il cliente cambia la propria chiave Des.
** La chiave è criptata con la chiave pubblica del server-server
e poi
** zippata. *)
procedure ChangeDesKey (AutToken:Integer; DesK:TByteDynArray);
stdcall;

(* Questa funzione ritorna la lista delle trader attive divise
per clienti,
** sales e dealer. *)
procedure GetClientsList (WantClients, WantSales,
WantDealers:Boolean; var
Clients, Sales, Dealers:ArrayOfString); stdcall;
end;

implementation

{ TReqParam }

constructor TReqParam.Create;
begin
inherited Create;
DataContext:=nil
end;
constructor TReqParam.Clone (AReqParam:TReqParam);
begin
inherited Create;
DataContext:=nil;
FDescrizione:=AReqParam.FDescrizione;
FTipo:=AReqParam.FTipo
end;

{ TReqInfo }

constructor TReqInfo.Create;
begin
inherited Create;
DataContext:=nil
end;
constructor TReqInfo.Clone (AReqInfo:TReqInfo);
var
Cont:Integer;
begin
inherited Create;
DataContext:=nil;
FCodice:=AReqInfo.FCodice;
FDescrizione:=AReqInfo.FDescrizione;
FSecondiAttesa:=AReqInfo.FSecondiAttesa;
SetLength (FParametri, Length (AReqInfo.FParametri));
for Cont:=0 to Length (FParametri)-1 do
FParametri [Cont]:=TReqParam.Clone (AReqInfo.FParametri [Cont])
end;

procedure TReqInfo.AddReqParam (const Descrizione:string;
Tipo:TParamType);
var
ReqParam:TReqParam;
begin
ReqParam:=TReqParam.Create;
ReqParam.Descrizione:=Descrizione;
ReqParam.Tipo:=Tipo
end;

{ TAccountInfo }

constructor TAccountInfo.Create;
begin
inherited Create;
DataContext:=nil
end;
constructor TAccountInfo.Clone (AAccountInfo:TAccountInfo);
begin
inherited Create;
DataContext:=nil;
FAccount:=AAccountInfo.FAccount;
FCieName:=AAccountInfo.FCieName;
FStatus:=AAccountInfo.FStatus
end;

{ TAutenticazioneInfo }

constructor TAutenticazioneInfo.Create;
begin
inherited Create;
DataContext:=nil
end;
constructor TAutenticazioneInfo.Clone
(AAutenticazioneInfo:TAutenticazioneInfo);
var
Cont:Integer;
begin
inherited Create;
DataContext:=nil;
FAutentToken:=AAutenticazioneInfo.FAutentToken;
FLoginId:=AAutenticazioneInfo.FLoginId;
FClientIP:=AAutenticazioneInfo.FClientIP;
FClientPubK:=AAutenticazioneInfo.FClientPubK;
FDesK:=AAutenticazioneInfo.FDesK;
FMustChangePswd:=AAutenticazioneInfo.FMustChangePswd;
FIsRealClt:=AAutenticazioneInfo.FIsRealClt;
FCanQuote:=AAutenticazioneInfo.FCanQuote;
FIsGestore:=AAutenticazioneInfo.FIsGestore;
FEMail:=AAutenticazioneInfo.FEMail;
FSMS:=AAutenticazioneInfo.FSMS;
FSMSEnabled:=AAutenticazioneInfo.FSMSEnabled;
FRealTime:=AAutenticazioneInfo.FRealTime;
SetLength (FMarketCodes, Length (AAutenticazioneInfo.FMarketCodes));
for Cont:=0 to Length (FMarketCodes)-1 do
FMarketCodes [Cont]:=AAutenticazioneInfo.FMarketCodes [Cont];
SetLength (FRequests, Length (FRequests));
for Cont:=0 to Length (FRequests)-1 do
FRequests [Cont]:=TReqInfo.Clone (AAutenticazioneInfo.FRequests
[Cont]);
FConnectionType:=AAutenticazioneInfo.FConnectionType;
SetLength (FAccountList, Length (AAutenticazioneInfo.FAccountList));
for Cont:=0 to Length (FAccountList)-1 do
FAccountList [Cont]:=TAccountInfo.Clone
(AAutenticazioneInfo.FAccountList [Cont]);
SetLength (FAdditionalAccountList, Length
(AAutenticazioneInfo.FAdditionalAccountList));
for Cont:=0 to Length (FAdditionalAccountList)-1 do
FAdditionalAccountList
[Cont]:=AAutenticazioneInfo.FAdditionalAccountList [Cont];
SetLength (FOperatorGroups, Length
(AAutenticazioneInfo.FOperatorGroups));
for Cont:=0 to Length (FOperatorGroups)-1 do
FOperatorGroups [Cont]:=AAutenticazioneInfo.FOperatorGroups
[Cont];
SetLength (FDescrUrlsToClt, Length
(AAutenticazioneInfo.FDescrUrlsToClt));
for Cont:=0 to Length (FDescrUrlsToClt)-1 do
FDescrUrlsToClt [Cont]:=AAutenticazioneInfo.FDescrUrlsToClt
[Cont];
SetLength (FUrlsToClt, Length (AAutenticazioneInfo.FUrlsToClt));
for Cont:=0 to Length (FUrlsToClt)-1 do
FUrlsToClt [Cont]:=AAutenticazioneInfo.FUrlsToClt [Cont];
FSupervisor:=AAutenticazioneInfo.FSupervisor;
FMMCode:=AAutenticazioneInfo.FMMCode;
SetLength (FListaProdotti, Length
(AAutenticazioneInfo.FListaProdotti));
for Cont:=0 to Length (FListaProdotti)-1 do
FListaProdotti [Cont]:=AAutenticazioneInfo.FListaProdotti [Cont]
end;

procedure TAutenticazioneInfo.AddMarketCode (MarketCode:TmktCodeType);
begin
SetLength (FMarketCodes, Length (FMarketCodes)+1);
FMarketCodes [Length (FMarketCodes)-1]:=MarketCode
end;

function TAutenticazioneInfo.AddRequest (Codice:Integer; const
Descrizione:
string; SecondiAttesa:Integer):TReqInfo;
begin
Result:=TReqInfo.Create;
Result.Codice:=Codice;
Result.Descrizione:=Descrizione;
Result.SecondiAttesa:=SecondiAttesa;
SetLength (FRequests, Length (Requests)+1);
FRequests [Length (FRequests)-1]:=Result
end;

procedure TAutenticazioneInfo.AddProduct (ProductCode:Integer);
begin
SetLength (FListaProdotti, Length (FListaProdotti)+1);
FListaProdotti [Length (FListaProdotti)-1]:=ProductCode
end;

procedure TAutenticazioneInfo.AddAccount (const Account,
CieName:string; Status:
TAccountStatus);
var
AccountInfo:TAccountInfo;
begin
AccountInfo:=TAccountInfo.Create;
AccountInfo.Account:=Account;
AccountInfo.CieName:=CieName;
AccountInfo.Status:=Status;
SetLength (FAccountList, Length (FAccountList)+1);
FAccountList [Length (FAccountList)-1]:=AccountInfo
end;

procedure TAutenticazioneInfo.AddAdditionalAccount (const
Account:string);
begin
SetLength (FAdditionalAccountList, Length
(FAdditionalAccountList)+1);
FAdditionalAccountList [Length (FAdditionalAccountList)-1]:=Account
end;

function TAutenticazioneInfo.GetUrl (const Descr:string):string;
var
Posiz:Integer;
begin
Posiz:=StringIndex (Descr, DescrUrlsToClt);
if Posiz=-1 then
Result:=''
else
Result:=UrlsToClt [Posiz]
end;

procedure TAutenticazioneInfo.AddOperatorGroup (const
OperatorGroup:string);
begin
SetLength (FOperatorGroups, Length (FOperatorGroups)+1);
FOperatorGroups [Length (FOperatorGroups)-1]:=OperatorGroup
end;

function TAutenticazioneInfo.GetAccountListAsAOS:ArrayOfString;
var
Cont:Integer;
begin
SetLength (Result, Length (FAccountList));
for Cont:=0 to Length (FAccountList)-1 do
Result [Cont]:=FAccountList [Cont].Account
end;

initialization
InvRegistry.RegisterInterface(TypeInfo(IServerServer), '', '');
RemClassRegistry.RegisterXSInfo (TypeInfo (TConnectionType));
RemClassRegistry.RegisterXSInfo (TypeInfo (ArrayOfInteger));
RemClassRegistry.RegisterXSInfo (TypeInfo (ArrayOfAccountInfo));
RemClassRegistry.RegisterXSInfo (TypeInfo (TmktCodeType));
RemClassRegistry.RegisterXSInfo (TypeInfo (ArrayOfTmktCodeType));
RemClassRegistry.RegisterXSInfo (TypeInfo (TParamType));
RemClassRegistry.RegisterXSClass (TReqParam);
RemClassRegistry.RegisterXSInfo (TypeInfo (ArrayOfReqParam));
RemClassRegistry.RegisterXSClass (TReqInfo);
RemClassRegistry.RegisterXSInfo (TypeInfo (ArrayOfReqInfo));
RemClassRegistry.RegisterXSInfo (TypeInfo (ArrayOfString));
RemClassRegistry.RegisterXSInfo (TypeInfo (TConnectionType));
RemClassRegistry.RegisterXSInfo (TypeInfo (TAccountStatus));
RemClassRegistry.RegisterXSClass (TAccountInfo);
RemClassRegistry.RegisterXSClass (TAutenticazioneInfo)
end.

Curia Damiano

unread,
Mar 5, 2002, 3:55:40 AM3/5/02
to
Ps: from other units:

type
TConnectionType=< subrange type >;
ArrayOfInteger=array of Integer;
TmktCodeType=<subrange type>;
ArrayOfTmktCodeType=array of TmktCodeType;
TParamType=<subrange type>;
ArrayOfString=array of string;

Damiano Curia

Rune Moberg

unread,
Mar 5, 2002, 4:25:43 AM3/5/02
to
"Curia Damiano" <cur...@euroforex.com> wrote in message
news:ov198ug0050t1rtqb...@4ax.com...
> type
> TConnectionType=< subrange type >;

Sounds like you're facing the same problem I reported last week. (see the
"Unable to register my type" thread in this nesgroup)

--
Rune

Curia Damiano

unread,
Mar 5, 2002, 4:35:26 AM3/5/02
to
Thanks, the problem is just this, i.e. I have this problem only in my
3 subrange types.
I'll wait for a patch... meanwhile, how are you solving this? (ps I
can't replace all my TConnectionType, etc in Integer in all of my
code, it's really a lot!)

Bye, Damiano Curia

Rune Moberg

unread,
Mar 5, 2002, 6:04:43 AM3/5/02
to
"Curia Damiano" <cur...@euroforex.com> wrote in message
news:27498ugcd6mql0tns...@4ax.com...

> Thanks, the problem is just this, i.e. I have this problem only in my
> 3 subrange types.

And by subrange you mean something like "1..99" and similar, right? (if it's
only a couple of values, then you could use an enumerated type -- they
should show up ok)

> I'll wait for a patch... meanwhile, how are you solving this? (ps I

I'm trying to make a few stabs at the VCL source to see if I can discern the
cause of this. For me this isn't top priority though, because an Int will
work just fine for my application.

(Current status: Dave thinks it's the autoregistration that's messing up and
I think he's right)

--
Rune

Dave Nottage (TeamB)

unread,
Mar 5, 2002, 6:24:37 AM3/5/02
to
"Rune Moberg" wrote:
> (Current status: Dave thinks it's the autoregistration that's messing
up and
> I think he's right)

Autoregistration is related, but not part of the solution. See my other
posts from your initial thread.

--
Dave Nottage (TeamB)


Jean-Marie Babet

unread,
Mar 5, 2002, 6:31:56 PM3/5/02
to
Curia (Dave and Rune),

I've spent some time with this problem and we definitely need to tweak
WebServExp.pas to catch cases of distinct type names based on other types.

e.g
OpaqueInt = type integer;
OpaqueWord = 32..128;

The current WSDL publishing code will only publish Typeinfos of kind
tkEnumeration, tkClass and tkDynArray. So in the case above, any part using
these types will will make reference to a type that can't be resolved.

I've updated my copy of WebServExp.pas to support new names based on the
type tkInteger. In the case of OpaqueInt above, we generate:

<xs:simpleType name="OpaqueInt">
<xs:restriction base="xs:integer" />
</xs:simpleType>

and in the case of OpaqueWord, we generate:

<xs:simpleType name="OpaqueWord">
<xs:restriction base="xs:integer">
<xs:minInclusive value="32" />
<xs:maxInclusive value="128" />
</xs:restriction>
</xs:simpleType>


I've posted a sample Service with the above at the following endpoint:

http://soap-server.borland.com/cgi-bin/CGIRegTypes.exe

I need to add support for other tkXXXX and also run some tests to make sure
I did not break anything. Once that's done, I'll be happy to upload the
WebServExp.pas for anyone who's interested.

More on this as soon as time allows,


Bruneau.


Dave Nottage (TeamB)

unread,
Mar 6, 2002, 8:40:12 AM3/6/02
to
"Jean-Marie Babet" wrote:
> In the case of OpaqueInt above, we generate:
>
> <xs:simpleType name="OpaqueInt">
> <xs:restriction base="xs:integer" />
> </xs:simpleType>

Aha! Looks pretty much like what I'd call a synonym.

> and in the case of OpaqueWord, we generate:
>
> <xs:simpleType name="OpaqueWord">
> <xs:restriction base="xs:integer">
> <xs:minInclusive value="32" />
> <xs:maxInclusive value="128" />
> </xs:restriction>
> </xs:simpleType>

Cool.

> I've posted a sample Service with the above at the following endpoint:
>
> http://soap-server.borland.com/cgi-bin/CGIRegTypes.exe
>
> I need to add support for other tkXXXX and also run some tests to make
sure
> I did not break anything. Once that's done, I'll be happy to upload
the
> WebServExp.pas for anyone who's interested.

Count me in. Thanks very much for the feedback.

--
Dave Nottage (TeamB)


Rune Moberg

unread,
Mar 6, 2002, 4:11:22 AM3/6/02
to
"Jean-Marie Babet" <bba...@borland.com> wrote in message
news:3c855582$1_2@dnews...

> <xs:simpleType name="OpaqueInt">
> <xs:restriction base="xs:integer" />
^^^^^^^
Surely that's supposed to be xs:int?

> </xs:simpleType>

--
Rune

Jean-Marie Babet

unread,
Mar 6, 2002, 2:59:00 PM3/6/02
to
Hell Rune,

> > <xs:simpleType name="OpaqueInt">
> > <xs:restriction base="xs:integer" />
> ^^^^^^^
> Surely that's supposed to be xs:int?


Yes! I definitely want the restriction of 'int' and not 'integer'. I missed
the mistake since both .NET WSDL.EXE import utility and AXIS WSDL2JAVA
importer took 'integer' without a warning about the range and (more
importantly) Delphi's importer, which could not resolve
http://www.w3.org/2001/XMLSchema:integer assumed it was a custom type and
simply emitted 'integer'!!

I glad you brought this up as it reminded me that I should add xsd:integer
to InvokeRegistry and map it to TXSDecimal (??) probably. This will allow
the importer to do a better mapping rather that leaving it as integer (which
range-wise is way off).

Incidentally, in my initial version version WebServExp I was always emitting
minInclusive and maxExclusive. So for OpaqueInt I generated:

<xs:simpleType name="OpaqueInt">
<xs:restriction base="xs:integer">

<xs:minInclusive value="-2147483648" />
<xs:maxInclusive value="2147483647" />
</xs:restriction>
</xs:simpleType>

Now that would have been a fancy way to make 'OpaqueInt' based on 'xsd:int'
from the type 'xsd:integer' :)

Anyway, I was hardcoding the string to 'integer' - once support for other
tkXXXX types are in, I'll be retrieving the name from InvokeRegistry's list
instead which will eliminate such mistakes.

Thanks,


Bruneau.


"Rune Moberg" <rmo...@arxi.no> wrote in message news:3c85dd3b_2@dnews...

Dave Nottage (TeamB)

unread,
Mar 7, 2002, 3:29:36 PM3/7/02
to
"Jean-Marie Babet" wrote:
> > > <xs:simpleType name="OpaqueInt">
> > > <xs:restriction base="xs:integer" />
> > ^^^^^^^
> > Surely that's supposed to be xs:int?
>
>
> Yes! I definitely want the restriction of 'int' and not 'integer'.

I'll bite.. whats the difference?

--
Dave Nottage (TeamB)


Jean-Marie Babet

unread,
Mar 6, 2002, 4:55:25 PM3/6/02
to
Hello Dave,

See the following link:

http://www.w3.org/TR/xmlschema-2/#integer

Summary (decimal -> integer -> long -> int)
=============================
int is ·derived· from long by setting the value of ·maxInclusive· to be
2147483647 and ·minInclusive· to be -2147483648.

long is ·derived· from integer by setting the value of ·maxInclusive· to be
9223372036854775807 and ·minInclusive· to be -9223372036854775808

integer is ·derived· from decimal by fixing the value of ·fractionDigits· to
be 0. This results in the standard mathematical concept of the integer
numbers.

Regards,


Bruneau.


0 new messages