Menu

[r8314]: / trunk / src / plain / ZPlainProxyDriverSoapProxy.pas  Maximize  Restore  History

Download this file

324 lines (271 with data), 15.6 kB

  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
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
{*********************************************************}
{ }
{ Zeos Database Objects }
{ DBC Layer Proxy Connectivity Classes }
{ }
{ Originally written by Jan Baumgarten }
{ }
{*********************************************************}
{@********************************************************}
{ Copyright (c) 1999-2020 Zeos Development Group }
{ }
{ License Agreement: }
{ }
{ This library is distributed in the hope that it will be }
{ useful, but WITHOUT ANY WARRANTY; without even the }
{ implied warranty of MERCHANTABILITY or FITNESS FOR }
{ A PARTICULAR PURPOSE. See the GNU Lesser General }
{ Public License for more details. }
{ }
{ The source code of the ZEOS Libraries and packages are }
{ distributed under the Library GNU General Public }
{ License (see the file COPYING / COPYING.ZEOS) }
{ with the following modification: }
{ As a special exception, the copyright holders of this }
{ library give you permission to link this library with }
{ independent modules to produce an executable, }
{ regardless of the license terms of these independent }
{ modules, and to copy and distribute the resulting }
{ executable under terms of your choice, provided that }
{ you also meet, for each linked independent module, }
{ the terms and conditions of the license of that module. }
{ An independent module is a module which is not derived }
{ from or based on this library. If you modify this }
{ library, you may extend this exception to your version }
{ of the library, but you are not obligated to do so. }
{ If you do not wish to do so, delete this exception }
{ statement from your version. }
{ }
{ }
{ The project web site is located on: }
{ http://zeoslib.sourceforge.net (FORUM) }
{ http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER) }
{ http://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
{ }
{ http://www.sourceforge.net/projects/zeoslib. }
{ }
{ }
{ Zeos Development Group. }
{********************************************************@}
// ************************************************************************ //
// Die in dieser Datei deklarierten Typen wurden aus Daten der unten
// beschriebenen WSDL-Datei generiert:
// WSDL : C:\Komponenten\Zeos 8\src\webservice\wsdl\zeosproxy.WSDL
// >Import : C:\Komponenten\Zeos 8\src\webservice\wsdl\zeosproxy.WSDL>0
// Codierung : utf-8
// Version: 1.0
// (21.09.2024 20:54:14 - - $Rev: 116709 $)
// ************************************************************************ //
unit ZPlainProxyDriverSoapProxy;
interface
{$I ZPlain.inc}
{$IF DEFINED(ENABLE_PROXY) AND DEFINED(ENABLE_INTERNAL_PROXY)}
uses {Soap.}InvokeRegistry, {Soap.}SOAPHTTPClient, {System.}Types, {Soap.}XSBuiltIns;
const
IS_OPTN = $0001;
IS_UNBD = $0002;
IS_UNQL = $0008;
type
// ************************************************************************ //
// Die folgenden Typen, auf die im WSDL-Dokument Bezug genommen wird, sind in dieser Datei
// nicht repräsentiert. Sie sind entweder Aliase[@] anderer repräsentierter Typen oder auf sie wurde Bezug genommen,
// aber sie sind in diesem Dokument nicht[!] deklariert. Die Typen aus letzterer Kategorie
// sind in der Regel vordefinierten/bekannten XML- oder Embarcadero-Typen zugeordnet; sie könnten aber auf
// ein inkorrektes WSDL-Dokument hinweisen, das einen Schematyp nicht deklariert oder importiert hat.
// ************************************************************************ //
// !:unsignedInt - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:boolean - "http://www.w3.org/2001/XMLSchema"[]
// !:int - "http://www.w3.org/2001/XMLSchema"[Lit][]
// !:string - "http://www.w3.org/2001/XMLSchema"[Lit][Gbl]
TStatementDescription = class; { "zproxy"[GblCplx] }
TStatementDescriptions = array of TStatementDescription; { "zproxy"[GblCplx] }
// ************************************************************************ //
// XML : TStatementDescription, global, <complexType>
// Namespace : zproxy
// ************************************************************************ //
TStatementDescription = class(TRemotable)
private
FSQL: string;
FParameters: string;
FMaxRows: Cardinal;
published
property SQL: string Index (IS_UNQL) read FSQL write FSQL;
property Parameters: string Index (IS_UNQL) read FParameters write FParameters;
property MaxRows: Cardinal Index (IS_UNQL) read FMaxRows write FMaxRows;
end;
TStringArray = array of string; { "zproxy"[Lit][GblCplx] }
// ************************************************************************ //
// Namespace : zproxy
// Transport : http://schemas.xmlsoap.org/soap/http
// Stil : rpc
// Verwenden von : literal
// Bindung : IZeosProxyBinding
// Service : IZeosProxy
// Port : IZeosProxyPort
// URL : 127.0.0.1/services/IZeosProxy
// ************************************************************************ //
IZeosProxy = interface(IInvokable)
['{269AF2BC-9AAB-FBA4-61C1-37129CFC7BFC}']
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabemeldung besteht aus mehreren Parts
function Connect(const UserName: string; const Password: string; const DbName: string; const InProperties: string; out OutProperties: string; out DbInfo: string
): string; stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
procedure Disconnect(const ConnectionID: string); stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
procedure SetAutoCommit(const ConnectionID: string; const Value: Boolean); stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
procedure Commit(const ConnectionID: string); stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
procedure Rollback(const ConnectionID: string); stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function SetProperties(const ConnectionID: string; const Properties: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function ExecuteStatement(const ConnectionID: string; const SQL: string; const Parameters: string; const MaxRows: Cardinal): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetTables(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const TableNamePattern: string; const Types: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
// - Ausgabe-Part verweist auf kein Element
function GetSchemas(const ConnectionID: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
// - Ausgabe-Part verweist auf kein Element
function GetCatalogs(const ConnectionID: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
// - Ausgabe-Part verweist auf kein Element
function GetTableTypes(const ConnectionID: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetColumns(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const TableNamePattern: string; const ColumnNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetTablePrivileges(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const TableNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetColumnPrivileges(const ConnectionID: string; const Catalog: string; const Schema: string; const Table: string; const ColumnNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetPrimaryKeys(const ConnectionID: string; const Catalog: string; const Schema: string; const Table: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetImportedKeys(const ConnectionID: string; const Catalog: string; const Schema: string; const Table: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetExportedKeys(const ConnectionID: string; const Catalog: string; const Schema: string; const Table: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetCrossReference(const ConnectionID: string; const PrimaryCatalog: string; const PrimarySchema: string; const PrimaryTable: string; const ForeignCatalog: string; const ForeignSchema: string;
const ForeignTable: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetIndexInfo(const ConnectionID: string; const Catalog: string; const Schema: string; const Table: string; const Unique: Boolean; const Approximate: Boolean
): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetSequences(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const SequenceNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetTriggers(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const TableNamePattern: string; const TriggerNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetProcedures(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const ProcedureNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function GetProcedureColumns(const ConnectionID: string; const Catalog: string; const SchemaPattern: string; const ProcedureNamePattern: string; const ColumnNamePattern: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
// - Ausgabe-Part verweist auf kein Element
function GetCharacterSets(const ConnectionID: string): string; stdcall;
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
// - Ausgabe-Part verweist auf kein Element
function StartTransaction(const ConnectionID: string): Integer; stdcall;
// Entpacken nicht möglich:
// - Ausgabe-Part verweist auf kein Element
function GetPublicKeys: string; stdcall;
// Entpacken nicht möglich:
// - Eingabemeldung besteht aus mehreren Parts
// - Ausgabe-Part verweist auf kein Element
function ExecuteMultipleStmts(const ConnectionID: string; const Statements: TStatementDescriptions): TStringArray; stdcall;
end;
function GetIZeosProxy(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): IZeosProxy;
{$IFEND}
implementation
{$IF DEFINED(ENABLE_PROXY) AND DEFINED(ENABLE_INTERNAL_PROXY)}
uses {System.}SysUtils;
function GetIZeosProxy(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IZeosProxy;
const
defWSDL = 'C:\Komponenten\Zeos 8\src\webservice\wsdl\zeosproxy.WSDL';
defURL = 'https://www.iks.ag/services/ZeosProxyBinding';
defSvc = 'IZeosProxy';
defPrt = 'IZeosProxyPort';
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 IZeosProxy);
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;
initialization
{ IZeosProxy }
InvRegistry.RegisterInterface(TypeInfo(IZeosProxy), 'zproxy', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IZeosProxy), '');
InvRegistry.RegisterInvokeOptions(TypeInfo(IZeosProxy), ioLiteral);
{ IZeosProxy.ExecuteMultipleStmts }
InvRegistry.RegisterParamInfo(TypeInfo(IZeosProxy), 'ExecuteMultipleStmts', 'Statements', '',
'[Namespace="zproxy", ArrayItemName="item"]');
InvRegistry.RegisterParamInfo(TypeInfo(IZeosProxy), 'ExecuteMultipleStmts', 'result', '',
'[Namespace="zproxy", ArrayItemName="item"]');
RemClassRegistry.RegisterXSInfo(TypeInfo(TStatementDescriptions), 'zproxy', 'TStatementDescriptions');
RemClassRegistry.RegisterXSClass(TStatementDescription, 'zproxy', 'TStatementDescription');
RemClassRegistry.RegisterXSInfo(TypeInfo(TStringArray), 'zproxy', 'TStringArray');
RemClassRegistry.RegisterSerializeOptions(TypeInfo(TStringArray), [xoLiteralParam]);
{$IFEND}
end.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.