You've already forked lazarus-ccr
Delphi server side support ( binary, soap, xmlrpc ):
- the Indy http_server compile and works - for xml, the Delphi xmldom unit as used ( tested with msxml ) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@213 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -46,12 +46,12 @@ object formImport: TformImport
|
|||||||
Left = 9
|
Left = 9
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 412
|
Width = 408
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object Button2: TButton
|
object Button2: TButton
|
||||||
Left = 439
|
Left = 435
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 40
|
Width = 40
|
||||||
@ -64,12 +64,12 @@ object formImport: TformImport
|
|||||||
Left = 9
|
Left = 9
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 88
|
Top = 88
|
||||||
Width = 412
|
Width = 408
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object Button3: TButton
|
object Button3: TButton
|
||||||
Left = 439
|
Left = 435
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 88
|
Top = 88
|
||||||
Width = 40
|
Width = 40
|
||||||
@ -149,8 +149,8 @@ object formImport: TformImport
|
|||||||
Left = 294
|
Left = 294
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 155
|
Width = 152
|
||||||
Caption = 'Implementation Skeletton file'
|
Caption = 'Implementation Skeleton file'
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object edtOptionIntfALL: TCheckBox
|
object edtOptionIntfALL: TCheckBox
|
||||||
@ -221,8 +221,8 @@ object formImport: TformImport
|
|||||||
Filter = 'WSDL Files ( *.wsdl )|*.wsdl'
|
Filter = 'WSDL Files ( *.wsdl )|*.wsdl'
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
||||||
left = 160
|
left = 272
|
||||||
top = 16
|
top = 32
|
||||||
end
|
end
|
||||||
object SDD: TSelectDirectoryDialog
|
object SDD: TSelectDirectoryDialog
|
||||||
Title = 'Choisir un r�pertoire'
|
Title = 'Choisir un r�pertoire'
|
||||||
|
@ -14,13 +14,13 @@ LazarusResources.Add('TformImport','FORMDATA',[
|
|||||||
+'on File ( WSDL )'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#9#6'H'
|
+'on File ( WSDL )'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#9#6'H'
|
||||||
+'eight'#2#14#3'Top'#2'E'#5'Width'#2'Q'#7'Caption'#6#16'Output directory'#11
|
+'eight'#2#14#3'Top'#2'E'#5'Width'#2'Q'#7'Caption'#6#16'Output directory'#11
|
||||||
+'ParentColor'#8#0#0#5'TEdit'#12'edtInputFile'#4'Left'#2#9#6'Height'#2#23#3'T'
|
+'ParentColor'#8#0#0#5'TEdit'#12'edtInputFile'#4'Left'#2#9#6'Height'#2#23#3'T'
|
||||||
+'op'#2#31#5'Width'#3#156#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'T'
|
+'op'#2#31#5'Width'#3#152#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'T'
|
||||||
+'abOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#183#1#6'Height'#2#25#3'Top'
|
+'abOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#179#1#6'Height'#2#25#3'Top'
|
||||||
+#2#31#5'Width'#2'('#6'Action'#7#11'actOpenFile'#7'Anchors'#11#5'akTop'#7'akR'
|
+#2#31#5'Width'#2'('#6'Action'#7#11'actOpenFile'#7'Anchors'#11#5'akTop'#7'akR'
|
||||||
+'ight'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#1#0#0#5'TEdit'#12'e'
|
+'ight'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#1#0#0#5'TEdit'#12'e'
|
||||||
+'dtOutputDir'#4'Left'#2#9#6'Height'#2#23#3'Top'#2'X'#5'Width'#3#156#1#7'Anch'
|
+'dtOutputDir'#4'Left'#2#9#6'Height'#2#23#3'Top'#2'X'#5'Width'#3#152#1#7'Anch'
|
||||||
+'ors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#2#0#0#7'TButton'#7'Bu'
|
+'ors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#2#0#0#7'TButton'#7'Bu'
|
||||||
+'tton3'#4'Left'#3#183#1#6'Height'#2#25#3'Top'#2'X'#5'Width'#2'('#6'Action'#7
|
+'tton3'#4'Left'#3#179#1#6'Height'#2#25#3'Top'#2'X'#5'Width'#2'('#6'Action'#7
|
||||||
+#10'actOpenDir'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBo'
|
+#10'actOpenDir'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBo'
|
||||||
+'rder'#2#4#8'TabOrder'#2#3#0#0#9'TCheckBox'#15'edtAddToProject'#4'Left'#2#9#6
|
+'rder'#2#4#8'TabOrder'#2#3#0#0#9'TCheckBox'#15'edtAddToProject'#4'Left'#2#9#6
|
||||||
+'Height'#2#13#3'Top'#3#128#0#5'Width'#3#176#0#7'Caption'#6'"Add the generate'
|
+'Height'#2#13#3'Top'#3#128#0#5'Width'#3#176#0#7'Caption'#6'"Add the generate'
|
||||||
@ -40,9 +40,9 @@ LazarusResources.Add('TformImport','FORMDATA',[
|
|||||||
+#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#2#0#0#9'TCheckBox'#15'edtOptionBind'
|
+#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#2#0#0#9'TCheckBox'#15'edtOptionBind'
|
||||||
+'er'#4'Left'#3'&'#1#6'Height'#2#13#3'Top'#2#8#5'Width'#2'i'#7'Caption'#6#19
|
+'er'#4'Left'#3'&'#1#6'Height'#2#13#3'Top'#2#8#5'Width'#2'i'#7'Caption'#6#19
|
||||||
+'Service Binder file'#8'TabOrder'#2#3#0#0#9'TCheckBox'#12'edtOptionImp'#4'Le'
|
+'Service Binder file'#8'TabOrder'#2#3#0#0#9'TCheckBox'#12'edtOptionImp'#4'Le'
|
||||||
+'ft'#3'&'#1#6'Height'#2#13#3'Top'#2'8'#5'Width'#3#155#0#7'Caption'#6#29'Impl'
|
+'ft'#3'&'#1#6'Height'#2#13#3'Top'#2'8'#5'Width'#3#152#0#7'Caption'#6#28'Impl'
|
||||||
+'ementation Skeletton file'#8'TabOrder'#2#4#0#0#9'TCheckBox'#16'edtOptionInt'
|
+'ementation Skeleton file'#8'TabOrder'#2#4#0#0#9'TCheckBox'#16'edtOptionIntf'
|
||||||
+'fALL'#4'Left'#2#30#6'Height'#2#13#3'Top'#2' '#5'Width'#2'X'#7'Caption'#6#15
|
+'ALL'#4'Left'#2#30#6'Height'#2#13#3'Top'#2' '#5'Width'#2'X'#7'Caption'#6#15
|
||||||
+'Parse all types'#7'OnClick'#7#21'edtOptionIntfALLClick'#8'TabOrder'#2#1#0#0
|
+'Parse all types'#7'OnClick'#7#21'edtOptionIntfALLClick'#8'TabOrder'#2#1#0#0
|
||||||
+#0#0#6'TPanel'#6'Panel1'#6'Height'#2'0'#3'Top'#3#234#1#5'Width'#3#14#2#5'Ali'
|
+#0#0#6'TPanel'#6'Panel1'#6'Height'#2'0'#3'Top'#3#234#1#5'Width'#3#14#2#5'Ali'
|
||||||
+'gn'#7#8'alBottom'#12'ClientHeight'#2'0'#11'ClientWidth'#3#14#2#8'TabOrder'#2
|
+'gn'#7#8'alBottom'#12'ClientHeight'#2'0'#11'ClientWidth'#3#14#2#8'TabOrder'#2
|
||||||
@ -59,7 +59,7 @@ LazarusResources.Add('TformImport','FORMDATA',[
|
|||||||
+'tion'#6#3'...'#18'DisableIfNoHandler'#9#9'OnExecute'#7#17'actOpenDirExecute'
|
+'tion'#6#3'...'#18'DisableIfNoHandler'#9#9'OnExecute'#7#17'actOpenDirExecute'
|
||||||
+#0#0#0#11'TOpenDialog'#2'OD'#5'Title'#6#26'Ouvrir un fichier existant'#6'Fil'
|
+#0#0#0#11'TOpenDialog'#2'OD'#5'Title'#6#26'Ouvrir un fichier existant'#6'Fil'
|
||||||
+'ter'#6#28'WSDL Files ( *.wsdl )|*.wsdl'#11'FilterIndex'#2#0#7'Options'#11#15
|
+'ter'#6#28'WSDL Files ( *.wsdl )|*.wsdl'#11'FilterIndex'#2#0#7'Options'#11#15
|
||||||
+'ofFileMustExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#160#0#3'to'
|
+'ofFileMustExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#16#1#3'top'
|
||||||
+'p'#2#16#0#0#22'TSelectDirectoryDialog'#3'SDD'#5'Title'#6#21'Choisir un r'
|
+#2' '#0#0#22'TSelectDirectoryDialog'#3'SDD'#5'Title'#6#21'Choisir un r'#233
|
||||||
+#233'pertoire'#11'FilterIndex'#2#0#4'left'#3#224#0#3'top'#3#176#0#0#0#0
|
+'pertoire'#11'FilterIndex'#2#0#4'left'#3#224#0#3'top'#3#176#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -11,17 +11,34 @@
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
}
|
}
|
||||||
|
|
||||||
unit app_object;
|
{$INCLUDE wst_global.inc}
|
||||||
|
{$IFDEF FPC}
|
||||||
|
//{$UNDEF INDY_9}
|
||||||
|
//{$DEFINE INDY_10}
|
||||||
|
{$ELSE}
|
||||||
|
//{$UNDEF INDY_10}
|
||||||
|
//{$DEFINE INDY_9}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
unit indy_http_server;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
IdCustomHTTPServer,
|
IdCustomHTTPServer,
|
||||||
IdHTTPServer, IdContext, IdSocketHandle;
|
IdHTTPServer,
|
||||||
|
{$IFDEF INDY_10}
|
||||||
|
IdContext,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF INDY_9}
|
||||||
|
IdTCPServer,
|
||||||
|
{$ENDIF}
|
||||||
|
IdSocketHandle;
|
||||||
|
|
||||||
|
{$INCLUDE wst.inc}
|
||||||
|
{$INCLUDE wst_delphi.inc}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TwstWebApplication }
|
{ TwstWebApplication }
|
||||||
@ -34,27 +51,43 @@ type
|
|||||||
function GenerateWSDLTable():string;
|
function GenerateWSDLTable():string;
|
||||||
|
|
||||||
procedure ProcessWSDLRequest(
|
procedure ProcessWSDLRequest(
|
||||||
|
{$IFDEF INDY_10}
|
||||||
AContext : TIdContext;
|
AContext : TIdContext;
|
||||||
|
{$ENDIF}
|
||||||
ARequestInfo : TIdHTTPRequestInfo;
|
ARequestInfo : TIdHTTPRequestInfo;
|
||||||
AResponseInfo : TIdHTTPResponseInfo;
|
AResponseInfo : TIdHTTPResponseInfo;
|
||||||
var APath : string
|
var APath : string
|
||||||
);
|
);
|
||||||
procedure ProcessServiceRequest(
|
procedure ProcessServiceRequest(
|
||||||
|
{$IFDEF INDY_10}
|
||||||
AContext : TIdContext;
|
AContext : TIdContext;
|
||||||
|
{$ENDIF}
|
||||||
ARequestInfo : TIdHTTPRequestInfo;
|
ARequestInfo : TIdHTTPRequestInfo;
|
||||||
AResponseInfo : TIdHTTPResponseInfo;
|
AResponseInfo : TIdHTTPResponseInfo;
|
||||||
var APath : string
|
var APath : string
|
||||||
);
|
);
|
||||||
private
|
private
|
||||||
procedure Handler_CommandGet(
|
procedure Handler_CommandGet(
|
||||||
|
{$IFDEF INDY_10}
|
||||||
AContext : TIdContext;
|
AContext : TIdContext;
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF INDY_9}
|
||||||
|
AThread: TIdPeerThread;
|
||||||
|
{$ENDIF}
|
||||||
ARequestInfo : TIdHTTPRequestInfo;
|
ARequestInfo : TIdHTTPRequestInfo;
|
||||||
AResponseInfo : TIdHTTPResponseInfo
|
AResponseInfo : TIdHTTPResponseInfo
|
||||||
);
|
);
|
||||||
public
|
public
|
||||||
constructor Create();
|
constructor Create(
|
||||||
|
const AServerIpAddress : string = '127.0.0.1';
|
||||||
|
const AListningPort : Integer = 8000;
|
||||||
|
const ADefaultClientPort : Integer = 25000;
|
||||||
|
const AServerSoftware : string = 'Web Service Toolkit Application'
|
||||||
|
);
|
||||||
destructor Destroy(); override;
|
destructor Destroy(); override;
|
||||||
procedure Display(const AMsg : string);
|
procedure Display(const AMsg : string);
|
||||||
|
procedure Start();
|
||||||
|
procedure Stop();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -62,11 +95,39 @@ implementation
|
|||||||
uses base_service_intf,
|
uses base_service_intf,
|
||||||
server_service_intf, server_service_imputils,
|
server_service_intf, server_service_imputils,
|
||||||
server_service_soap, server_binary_formatter, server_service_xmlrpc,
|
server_service_soap, server_binary_formatter, server_service_xmlrpc,
|
||||||
metadata_repository, metadata_wsdl, DOM, XMLWrite,
|
metadata_repository, metadata_wsdl,
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
ActiveX, XMLDoc,XMLIntf,xmldom, wst_delphi_xml,
|
||||||
|
{$ELSE}
|
||||||
|
DOM, XMLWrite, wst_fpc_xml,
|
||||||
|
{$ENDIF}
|
||||||
metadata_service, metadata_service_binder, metadata_service_imp,
|
metadata_service, metadata_service_binder, metadata_service_imp,
|
||||||
|
|
||||||
user_service_intf, user_service_intf_binder, user_service_intf_imp;
|
user_service_intf, user_service_intf_binder, user_service_intf_imp;
|
||||||
|
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
type
|
||||||
|
TwstIndy9Thread = class(TIdPeerThread)
|
||||||
|
protected
|
||||||
|
procedure AfterExecute; override;
|
||||||
|
procedure BeforeExecute; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TwstIndy9Thread }
|
||||||
|
|
||||||
|
procedure TwstIndy9Thread.AfterExecute;
|
||||||
|
begin
|
||||||
|
CoUninitialize();
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TwstIndy9Thread.BeforeExecute;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
CoInitialize(nil);
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
const
|
const
|
||||||
sSEPARATOR = '/';
|
sSEPARATOR = '/';
|
||||||
sSERVICES_PREFIXE = 'services';
|
sSERVICES_PREFIXE = 'services';
|
||||||
@ -113,7 +174,7 @@ begin
|
|||||||
//if ( GetModuleMetadataMngr().LoadRepositoryName(s,rep) > 0 ) then
|
//if ( GetModuleMetadataMngr().LoadRepositoryName(s,rep) > 0 ) then
|
||||||
//rep^.namespace := 'urn:wst';
|
//rep^.namespace := 'urn:wst';
|
||||||
strm.Clear();
|
strm.Clear();
|
||||||
doc := TXMLDocument.Create();
|
doc := CreateDoc();
|
||||||
GenerateWSDL(rep,doc);
|
GenerateWSDL(rep,doc);
|
||||||
WriteXMLFile(doc,strm);
|
WriteXMLFile(doc,strm);
|
||||||
i := strm.Size;
|
i := strm.Size;
|
||||||
@ -122,7 +183,7 @@ begin
|
|||||||
Move(strm.memory^,Result[1],i);
|
Move(strm.memory^,Result[1],i);
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
doc.Free();
|
ReleaseDomNode(doc);
|
||||||
strm.Free();
|
strm.Free();
|
||||||
GetModuleMetadataMngr().ClearRepository(rep);
|
GetModuleMetadataMngr().ClearRepository(rep);
|
||||||
end;
|
end;
|
||||||
@ -163,7 +224,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TwstWebApplication.ProcessWSDLRequest(
|
procedure TwstWebApplication.ProcessWSDLRequest(
|
||||||
|
{$IFDEF INDY_10}
|
||||||
AContext : TIdContext;
|
AContext : TIdContext;
|
||||||
|
{$ENDIF}
|
||||||
ARequestInfo : TIdHTTPRequestInfo;
|
ARequestInfo : TIdHTTPRequestInfo;
|
||||||
AResponseInfo : TIdHTTPResponseInfo;
|
AResponseInfo : TIdHTTPResponseInfo;
|
||||||
var APath : string
|
var APath : string
|
||||||
@ -189,7 +252,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TwstWebApplication.ProcessServiceRequest(
|
procedure TwstWebApplication.ProcessServiceRequest(
|
||||||
|
{$IFDEF INDY_10}
|
||||||
AContext : TIdContext;
|
AContext : TIdContext;
|
||||||
|
{$ENDIF}
|
||||||
ARequestInfo : TIdHTTPRequestInfo;
|
ARequestInfo : TIdHTTPRequestInfo;
|
||||||
AResponseInfo : TIdHTTPResponseInfo;
|
AResponseInfo : TIdHTTPResponseInfo;
|
||||||
var APath : string
|
var APath : string
|
||||||
@ -197,21 +262,23 @@ procedure TwstWebApplication.ProcessServiceRequest(
|
|||||||
var
|
var
|
||||||
trgt,ctntyp, frmt : string;
|
trgt,ctntyp, frmt : string;
|
||||||
rqst : IRequestBuffer;
|
rqst : IRequestBuffer;
|
||||||
inStream: TMemoryStream;
|
inStream : {$IFDEF FPC}TMemoryStream{$ELSE}TStringStream{$ENDIF};
|
||||||
begin
|
begin
|
||||||
trgt := ExtractNextPathElement(APath);
|
trgt := ExtractNextPathElement(APath);
|
||||||
if AnsiSameText(sWSDL,trgt) then begin
|
if AnsiSameText(sWSDL,trgt) then begin
|
||||||
ProcessWSDLRequest(AContext,ARequestInfo,AResponseInfo,APath);
|
ProcessWSDLRequest({$IFDEF INDY_10}AContext,{$ENDIF}ARequestInfo,AResponseInfo,APath);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
inStream := nil;
|
inStream := nil;
|
||||||
try
|
try
|
||||||
try
|
try
|
||||||
inStream := TMemoryStream.Create();
|
inStream := {$IFDEF FPC}TMemoryStream.Create();{$ELSE}TStringStream.Create(ARequestInfo.FormParams);{$ENDIF}
|
||||||
AResponseInfo.ContentStream := TMemoryStream.Create();
|
AResponseInfo.ContentStream := TMemoryStream.Create();
|
||||||
|
|
||||||
ctntyp := ARequestInfo.ContentType;
|
ctntyp := ARequestInfo.ContentType;
|
||||||
|
{$IFDEF FPC}
|
||||||
inStream.CopyFrom(ARequestInfo.PostStream,0);
|
inStream.CopyFrom(ARequestInfo.PostStream,0);
|
||||||
|
{$ENDIF}
|
||||||
inStream.Position := 0;
|
inStream.Position := 0;
|
||||||
AResponseInfo.ContentType := ctntyp;
|
AResponseInfo.ContentType := ctntyp;
|
||||||
frmt := Trim(ARequestInfo.Params.Values['format']);
|
frmt := Trim(ARequestInfo.Params.Values['format']);
|
||||||
@ -229,7 +296,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TwstWebApplication.Handler_CommandGet(
|
procedure TwstWebApplication.Handler_CommandGet(
|
||||||
AContext : TIdContext;
|
{$IFDEF INDY_10}
|
||||||
|
AContext : TIdContext;
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF INDY_9}
|
||||||
|
AThread: TIdPeerThread;
|
||||||
|
{$ENDIF}
|
||||||
ARequestInfo : TIdHTTPRequestInfo;
|
ARequestInfo : TIdHTTPRequestInfo;
|
||||||
AResponseInfo : TIdHTTPResponseInfo
|
AResponseInfo : TIdHTTPResponseInfo
|
||||||
);
|
);
|
||||||
@ -247,7 +319,7 @@ begin
|
|||||||
locPath := ARequestInfo.Document;
|
locPath := ARequestInfo.Document;
|
||||||
locPathPart := ExtractNextPathElement(locPath);
|
locPathPart := ExtractNextPathElement(locPath);
|
||||||
if AnsiSameText(sSERVICES_PREFIXE,locPathPart) then begin
|
if AnsiSameText(sSERVICES_PREFIXE,locPathPart) then begin
|
||||||
ProcessServiceRequest(AContext,ARequestInfo,AResponseInfo,locPath);
|
ProcessServiceRequest({$IFDEF INDY_10}AContext,{$ENDIF}ARequestInfo,AResponseInfo,locPath);
|
||||||
if Assigned(AResponseInfo.ContentStream) and ( AResponseInfo.ContentStream.Size > 0 ) then begin
|
if Assigned(AResponseInfo.ContentStream) and ( AResponseInfo.ContentStream.Size > 0 ) then begin
|
||||||
j := AResponseInfo.ContentStream.Size;
|
j := AResponseInfo.ContentStream.Size;
|
||||||
SetLength(s,j);
|
SetLength(s,j);
|
||||||
@ -259,24 +331,32 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ProcessWSDLRequest(AContext,ARequestInfo,AResponseInfo,locPath);
|
ProcessWSDLRequest({$IFDEF INDY_10}AContext,{$ENDIF}ARequestInfo,AResponseInfo,locPath);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TwstWebApplication.Create();
|
constructor TwstWebApplication.Create(
|
||||||
|
const AServerIpAddress : string;
|
||||||
|
const AListningPort : Integer;
|
||||||
|
const ADefaultClientPort : Integer;
|
||||||
|
const AServerSoftware : string
|
||||||
|
);
|
||||||
var
|
var
|
||||||
b : TIdSocketHandle;
|
b : TIdSocketHandle;
|
||||||
begin
|
begin
|
||||||
inherited Create();
|
inherited Create();
|
||||||
FHTTPServerObject := TIdHTTPServer.Create();
|
FHTTPServerObject := TIdHTTPServer.Create({$IFNDEF INDY_10}nil{$ENDIF});
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
FHTTPServerObject.ThreadClass := TwstIndy9Thread;
|
||||||
|
{$ENDIF}
|
||||||
b := FHTTPServerObject.Bindings.Add();
|
b := FHTTPServerObject.Bindings.Add();
|
||||||
b.IP:='127.0.0.1';
|
b.IP := AServerIpAddress;
|
||||||
b.port:=8000;
|
b.port := AListningPort;
|
||||||
FRootAddress := 'http://127.0.0.1:8000/';
|
FRootAddress := Format('http://%s:%d/',[AServerIpAddress,AListningPort]);
|
||||||
|
|
||||||
FHTTPServerObject.DefaultPort := 25000;
|
FHTTPServerObject.DefaultPort := ADefaultClientPort;
|
||||||
FHTTPServerObject.ServerSoftware := 'Web Service Toolkit Sample WebServer';
|
FHTTPServerObject.ServerSoftware := AServerSoftware;
|
||||||
FHTTPServerObject.Active := True;
|
FHTTPServerObject.Active := True;
|
||||||
FHTTPServerObject.OnCommandGet := @Handler_CommandGet;
|
FHTTPServerObject.OnCommandGet := {$IFDEF FPC}@{$ENDIF}Handler_CommandGet;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TwstWebApplication.Destroy();
|
destructor TwstWebApplication.Destroy();
|
||||||
@ -287,7 +367,20 @@ end;
|
|||||||
|
|
||||||
procedure TwstWebApplication.Display(const AMsg: string);
|
procedure TwstWebApplication.Display(const AMsg: string);
|
||||||
begin
|
begin
|
||||||
WriteLn(AMsg);
|
//WriteLn(AMsg);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TwstWebApplication.Start();
|
||||||
|
begin
|
||||||
|
if not FHTTPServerObject.Active then
|
||||||
|
FHTTPServerObject.Active := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TwstWebApplication.Stop();
|
||||||
|
begin
|
||||||
|
if FHTTPServerObject.Active then
|
||||||
|
FHTTPServerObject.Active := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
@ -295,13 +388,13 @@ initialization
|
|||||||
Server_service_RegisterBinaryFormat();
|
Server_service_RegisterBinaryFormat();
|
||||||
Server_service_RegisterSoapFormat();
|
Server_service_RegisterSoapFormat();
|
||||||
Server_service_RegisterXmlRpcFormat();
|
Server_service_RegisterXmlRpcFormat();
|
||||||
|
|
||||||
RegisterUserServiceImplementationFactory();
|
RegisterUserServiceImplementationFactory();
|
||||||
Server_service_RegisterUserServiceService();
|
Server_service_RegisterUserServiceService();
|
||||||
|
|
||||||
Register_user_service_intf_ServiceMetadata();
|
Register_user_service_intf_ServiceMetadata();
|
||||||
|
|
||||||
RegisterWSTMetadataServiceImplementationFactory();
|
RegisterWSTMetadataServiceImplementationFactory();
|
||||||
Server_service_RegisterWSTMetadataServiceService();
|
Server_service_RegisterWSTMetadataServiceService();
|
||||||
|
|
||||||
end.
|
end.
|
@ -13,15 +13,15 @@
|
|||||||
{$INCLUDE wst_global.inc}
|
{$INCLUDE wst_global.inc}
|
||||||
unit metadata_wsdl;
|
unit metadata_wsdl;
|
||||||
|
|
||||||
{$INCLUDE wst.inc}
|
|
||||||
{$INCLUDE wst_delphi.inc}
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, TypInfo,
|
Classes, SysUtils, TypInfo,
|
||||||
DOM,
|
{$IFNDEF FPC}xmldom, wst_delphi_xml{$ELSE}DOM{$ENDIF},
|
||||||
base_service_intf, metadata_repository;
|
base_service_intf, metadata_repository;
|
||||||
|
|
||||||
|
{$INCLUDE wst.inc}
|
||||||
|
{$INCLUDE wst_delphi.inc}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ type
|
|||||||
['{DA9AF8B1-392B-49A8-91CC-6B5C5131E6FA}']
|
['{DA9AF8B1-392B-49A8-91CC-6B5C5131E6FA}']
|
||||||
procedure Generate(
|
procedure Generate(
|
||||||
const APascalTypeName : string;
|
const APascalTypeName : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure Generate(
|
procedure Generate(
|
||||||
const APascalTypeName : string;
|
const APascalTypeName : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure Generate(
|
procedure Generate(
|
||||||
const APascalTypeName : string;
|
const APascalTypeName : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -72,15 +72,16 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure Generate(
|
procedure Generate(
|
||||||
const APascalTypeName : string;
|
const APascalTypeName : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TDOMDocument);
|
procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TXMLDocument);
|
||||||
|
|
||||||
function GetWsdlTypeHandlerRegistry():IWsdlTypeHandlerRegistry;
|
function GetWsdlTypeHandlerRegistry():IWsdlTypeHandlerRegistry;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
uses {$IFNDEF FPC}wst_delphi_rtti_utils{$ELSE}wst_fpc_xml{$ENDIF};
|
||||||
|
|
||||||
const
|
const
|
||||||
sWSDL_NS = 'http://schemas.xmlsoap.org/wsdl/';
|
sWSDL_NS = 'http://schemas.xmlsoap.org/wsdl/';
|
||||||
@ -250,7 +251,7 @@ begin
|
|||||||
inherited Destroy();
|
inherited Destroy();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CreateElement(const ANodeName : DOMString; AParent : TDOMNode; ADoc : TDOMDocument):TDOMElement;//inline;
|
function CreateElement(const ANodeName : DOMString; AParent : TDOMNode; ADoc : TXMLDocument):TDOMElement;//inline;
|
||||||
begin
|
begin
|
||||||
Result := ADoc.CreateElement(ANodeName);
|
Result := ADoc.CreateElement(ANodeName);
|
||||||
AParent.AppendChild(Result);
|
AParent.AppendChild(Result);
|
||||||
@ -272,8 +273,10 @@ begin
|
|||||||
b := ( Length(AStartingWith) = 0);
|
b := ( Length(AStartingWith) = 0);
|
||||||
c := Pred(ANode.Attributes.Length);
|
c := Pred(ANode.Attributes.Length);
|
||||||
if ( AStartIndex >= 0 ) then
|
if ( AStartIndex >= 0 ) then
|
||||||
i := AStartIndex;
|
i := AStartIndex
|
||||||
for i := 0 to c do begin
|
else
|
||||||
|
i := 0;
|
||||||
|
for i := i to c do begin
|
||||||
if AnsiSameText(AAttValue,ANode.Attributes.Item[i].NodeValue) and
|
if AnsiSameText(AAttValue,ANode.Attributes.Item[i].NodeValue) and
|
||||||
( b or ( Pos(AStartingWith,ANode.Attributes.Item[i].NodeName) = 1 ))
|
( b or ( Pos(AStartingWith,ANode.Attributes.Item[i].NodeName) = 1 ))
|
||||||
then begin
|
then begin
|
||||||
@ -288,13 +291,13 @@ end;
|
|||||||
|
|
||||||
function GetNameSpaceShortName(
|
function GetNameSpaceShortName(
|
||||||
const ANameSpace : string;
|
const ANameSpace : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
):string;//inline;
|
):string;//inline;
|
||||||
begin
|
begin
|
||||||
if FindAttributeByValueInNode(ANameSpace,AWsdlDocument.DocumentElement,Result,0,sXMLNS) then begin
|
if FindAttributeByValueInNode(ANameSpace,AWsdlDocument.DocumentElement,Result,0,sXMLNS) then begin
|
||||||
Result := Copy(Result,Length(sXMLNS+':')+1,MaxInt);
|
Result := Copy(Result,Length(sXMLNS+':')+1,MaxInt);
|
||||||
end else begin
|
end else begin
|
||||||
Result := Format('ns%d',[AWsdlDocument.DocumentElement.Attributes.{$IFNDEF FPC_211}Count{$ELSE}Length{$ENDIF}]) ;
|
Result := Format('ns%d',[GetNodeListCount(AWsdlDocument.DocumentElement.Attributes)]) ;
|
||||||
AWsdlDocument.DocumentElement.SetAttribute(Format('%s:%s',[sXMLNS,Result]),ANameSpace);
|
AWsdlDocument.DocumentElement.SetAttribute(Format('%s:%s',[sXMLNS,Result]),ANameSpace);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -306,7 +309,7 @@ begin
|
|||||||
Result := AService^.Name + PART_NAME_MAP[AServicePart];
|
Result := AService^.Name + PART_NAME_MAP[AServicePart];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TDOMDocument);
|
procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TXMLDocument);
|
||||||
|
|
||||||
procedure GenerateServiceMessages(
|
procedure GenerateServiceMessages(
|
||||||
AService : PService;
|
AService : PService;
|
||||||
@ -342,12 +345,15 @@ procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TDOMDocument);
|
|||||||
rspNode := CreateElement(sWSDL_MESSAGE,ARootNode,ADoc);
|
rspNode := CreateElement(sWSDL_MESSAGE,ARootNode,ADoc);
|
||||||
rspNode.SetAttribute(sWSDL_NAME,Format('%sResponse',[AOperation^.Name]));
|
rspNode.SetAttribute(sWSDL_NAME,Format('%sResponse',[AOperation^.Name]));
|
||||||
cc := AOperation^.ParamsCount;
|
cc := AOperation^.ParamsCount;
|
||||||
for ii := 0 to Pred(cc) do begin
|
if ( cc > 0 ) then begin
|
||||||
pp := @(AOperation^.Params[ii]);
|
pp := AOperation^.Params;
|
||||||
if ( pp^.Modifier in [opfNone, opfIn] ) then
|
for ii := 0 to Pred(cc) do begin
|
||||||
GenerateParam(pp,qryNode)
|
if ( pp^.Modifier in [opfNone, opfIn] ) then
|
||||||
else if ( pp^.Modifier in [opfVar, opfOut] ) then
|
GenerateParam(pp,qryNode)
|
||||||
GenerateParam(pp,rspNode);
|
else if ( pp^.Modifier in [opfVar, opfOut] ) then
|
||||||
|
GenerateParam(pp,rspNode);
|
||||||
|
Inc(pp);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -358,8 +364,10 @@ procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TDOMDocument);
|
|||||||
k := AService^.OperationsCount;
|
k := AService^.OperationsCount;
|
||||||
if ( k > 0 ) then begin
|
if ( k > 0 ) then begin
|
||||||
po := AService^.Operations;
|
po := AService^.Operations;
|
||||||
for j := 0 to pred(k) do
|
for j := 0 to pred(k) do begin
|
||||||
GenerateOperationMessage(@(po[j]));
|
GenerateOperationMessage(po);
|
||||||
|
Inc(po);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -388,7 +396,8 @@ procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TDOMDocument);
|
|||||||
if ( k > 0 ) then begin
|
if ( k > 0 ) then begin
|
||||||
po := AService^.Operations;
|
po := AService^.Operations;
|
||||||
for j := 0 to pred(k) do begin
|
for j := 0 to pred(k) do begin
|
||||||
GenerateOperation(@(po[j]),prtTypeNode);
|
GenerateOperation(po,prtTypeNode);
|
||||||
|
Inc(po);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -453,7 +462,8 @@ procedure GenerateWSDL(AMdtdRep : PServiceRepository; ADoc : TDOMDocument);
|
|||||||
if ( k > 0 ) then begin
|
if ( k > 0 ) then begin
|
||||||
po := AService^.Operations;
|
po := AService^.Operations;
|
||||||
for j := 0 to pred(k) do begin
|
for j := 0 to pred(k) do begin
|
||||||
GenerateOperation(@(po[j]),bndgNode);
|
GenerateOperation(po,bndgNode);
|
||||||
|
Inc(po);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -537,16 +547,23 @@ begin
|
|||||||
if ( c > 0 ) then begin
|
if ( c > 0 ) then begin
|
||||||
ps := AMdtdRep^.Services;
|
ps := AMdtdRep^.Services;
|
||||||
for i := 0 to Pred(c) do begin
|
for i := 0 to Pred(c) do begin
|
||||||
GenerateServiceMessages(@(ps[i]),defNode);
|
GenerateServiceMessages(ps,defNode);
|
||||||
|
Inc(ps);
|
||||||
end;
|
end;
|
||||||
|
ps := AMdtdRep^.Services;
|
||||||
for i := 0 to Pred(c) do begin
|
for i := 0 to Pred(c) do begin
|
||||||
GenerateServicePortType(@(ps[i]),defNode);
|
GenerateServicePortType(ps,defNode);
|
||||||
|
Inc(ps);
|
||||||
end;
|
end;
|
||||||
|
ps := AMdtdRep^.Services;
|
||||||
for i := 0 to Pred(c) do begin
|
for i := 0 to Pred(c) do begin
|
||||||
GenerateServiceBinding(@(ps[i]),defNode);
|
GenerateServiceBinding(ps,defNode);
|
||||||
|
Inc(ps);
|
||||||
end;
|
end;
|
||||||
|
ps := AMdtdRep^.Services;
|
||||||
for i := 0 to Pred(c) do begin
|
for i := 0 to Pred(c) do begin
|
||||||
GenerateServicePublication(@(ps[i]),defNode);
|
GenerateServicePublication(ps,defNode);
|
||||||
|
Inc(ps);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -565,7 +582,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure Generate(
|
procedure Generate(
|
||||||
const APascalTypeName : string;
|
const APascalTypeName : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -573,7 +590,7 @@ type
|
|||||||
|
|
||||||
procedure TBaseComplexRemotable_TypeHandler.Generate(
|
procedure TBaseComplexRemotable_TypeHandler.Generate(
|
||||||
const APascalTypeName : string;
|
const APascalTypeName : string;
|
||||||
AWsdlDocument : TDOMDocument
|
AWsdlDocument : TXMLDocument
|
||||||
);
|
);
|
||||||
var
|
var
|
||||||
typItm, propTypItm : TTypeRegistryItem;
|
typItm, propTypItm : TTypeRegistryItem;
|
||||||
@ -593,7 +610,7 @@ begin
|
|||||||
( typItm.DataType^.Kind = tkClass )
|
( typItm.DataType^.Kind = tkClass )
|
||||||
then begin
|
then begin
|
||||||
GetNameSpaceShortName(typItm.NameSpace,AWsdlDocument);
|
GetNameSpaceShortName(typItm.NameSpace,AWsdlDocument);
|
||||||
defTypesNode := AWsdlDocument.DocumentElement.FindNode(sWSDL_TYPES) as TDOMElement;
|
defTypesNode := FindNode(AWsdlDocument.DocumentElement,sWSDL_TYPES) as TDOMElement;
|
||||||
Assert(Assigned(defTypesNode));
|
Assert(Assigned(defTypesNode));
|
||||||
defSchemaNode := defTypesNode.FirstChild as TDOMElement;
|
defSchemaNode := defTypesNode.FirstChild as TDOMElement;
|
||||||
|
|
||||||
@ -652,12 +669,12 @@ end;
|
|||||||
|
|
||||||
procedure TEnumTypeHandler.Generate(
|
procedure TEnumTypeHandler.Generate(
|
||||||
const APascalTypeName: string;
|
const APascalTypeName: string;
|
||||||
AWsdlDocument: TDOMDocument
|
AWsdlDocument: TXMLDocument
|
||||||
);
|
);
|
||||||
var
|
var
|
||||||
typItm : TTypeRegistryItem;
|
typItm : TTypeRegistryItem;
|
||||||
ns_shortName, s : string;
|
ns_shortName, s : string;
|
||||||
defTypesNode, defSchemaNode, resNode, restrictNode, eltNode : TDOMElement;
|
defTypesNode, defSchemaNode, resNode, restrictNode : TDOMElement;
|
||||||
i, c : Integer;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
typItm := GetTypeRegistry().Find(APascalTypeName);
|
typItm := GetTypeRegistry().Find(APascalTypeName);
|
||||||
@ -667,10 +684,10 @@ begin
|
|||||||
if FindAttributeByValueInNode(typItm.NameSpace,AWsdlDocument.DocumentElement,ns_shortName) then begin
|
if FindAttributeByValueInNode(typItm.NameSpace,AWsdlDocument.DocumentElement,ns_shortName) then begin
|
||||||
ns_shortName := Copy(ns_shortName,Length(sXMLNS+':')+1,MaxInt);
|
ns_shortName := Copy(ns_shortName,Length(sXMLNS+':')+1,MaxInt);
|
||||||
end else begin
|
end else begin
|
||||||
ns_shortName := Format('ns%d',[AWsdlDocument.DocumentElement.Attributes.{$IFNDEF FPC_211}Count{$ELSE}Length{$ENDIF}]) ;
|
ns_shortName := Format('ns%d',[GetNodeListCount(AWsdlDocument.DocumentElement.Attributes)]) ;
|
||||||
AWsdlDocument.DocumentElement.SetAttribute(Format('%s:%s',[sXMLNS,ns_shortName]),typItm.NameSpace);
|
AWsdlDocument.DocumentElement.SetAttribute(Format('%s:%s',[sXMLNS,ns_shortName]),typItm.NameSpace);
|
||||||
end;
|
end;
|
||||||
defTypesNode := AWsdlDocument.DocumentElement.FindNode(sWSDL_TYPES) as TDOMElement;
|
defTypesNode := FindNode(AWsdlDocument.DocumentElement,sWSDL_TYPES) as TDOMElement;
|
||||||
Assert(Assigned(defTypesNode));
|
Assert(Assigned(defTypesNode));
|
||||||
defSchemaNode := defTypesNode.FirstChild as TDOMElement;
|
defSchemaNode := defTypesNode.FirstChild as TDOMElement;
|
||||||
|
|
||||||
@ -700,7 +717,7 @@ end;
|
|||||||
|
|
||||||
procedure TFakeTypeHandler.Generate(
|
procedure TFakeTypeHandler.Generate(
|
||||||
const APascalTypeName: string;
|
const APascalTypeName: string;
|
||||||
AWsdlDocument: TDOMDocument
|
AWsdlDocument: TXMLDocument
|
||||||
);
|
);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
@ -712,17 +729,19 @@ begin
|
|||||||
r := GetWsdlTypeHandlerRegistry();
|
r := GetWsdlTypeHandlerRegistry();
|
||||||
r.RegisterDefaultHandler(tkInteger,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkInteger,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
r.RegisterDefaultHandler(tkInt64,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkInt64,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
r.RegisterDefaultHandler(tkQWord,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
|
||||||
|
|
||||||
|
{$IFDEF FPC}
|
||||||
|
r.RegisterDefaultHandler(tkQWord,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
r.RegisterDefaultHandler(tkSString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkSString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
r.RegisterDefaultHandler(tkLString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
|
||||||
r.RegisterDefaultHandler(tkAString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkAString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
|
||||||
|
|
||||||
r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
|
||||||
|
|
||||||
r.RegisterDefaultHandler(tkBool,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkBool,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
r.RegisterDefaultHandler(tkLString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
|
r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
|
|
||||||
|
r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory);
|
||||||
|
|
||||||
r.RegisterDefaultHandler(tkEnumeration,TSimpleItemFactory.Create(TEnumTypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkEnumeration,TSimpleItemFactory.Create(TEnumTypeHandler) as IItemFactory);
|
||||||
|
|
||||||
r.RegisterDefaultHandler(tkClass,TSimpleItemFactory.Create(TBaseComplexRemotable_TypeHandler) as IItemFactory);
|
r.RegisterDefaultHandler(tkClass,TSimpleItemFactory.Create(TBaseComplexRemotable_TypeHandler) as IItemFactory);
|
||||||
@ -757,7 +776,7 @@ end;
|
|||||||
|
|
||||||
procedure TBaseArrayRemotable_TypeHandler.Generate(
|
procedure TBaseArrayRemotable_TypeHandler.Generate(
|
||||||
const APascalTypeName: string;
|
const APascalTypeName: string;
|
||||||
AWsdlDocument: TDOMDocument
|
AWsdlDocument: TXMLDocument
|
||||||
);
|
);
|
||||||
|
|
||||||
function GetNameSpaceShortName(const ANameSpace : string):string;//inline;
|
function GetNameSpaceShortName(const ANameSpace : string):string;//inline;
|
||||||
@ -765,7 +784,7 @@ procedure TBaseArrayRemotable_TypeHandler.Generate(
|
|||||||
if FindAttributeByValueInNode(ANameSpace,AWsdlDocument.DocumentElement,Result,0,sXMLNS) then begin
|
if FindAttributeByValueInNode(ANameSpace,AWsdlDocument.DocumentElement,Result,0,sXMLNS) then begin
|
||||||
Result := Copy(Result,Length(sXMLNS+':')+1,MaxInt);
|
Result := Copy(Result,Length(sXMLNS+':')+1,MaxInt);
|
||||||
end else begin
|
end else begin
|
||||||
Result := Format('ns%d',[AWsdlDocument.DocumentElement.Attributes.{$IFNDEF FPC_211}Count{$ELSE}Length{$ENDIF}]) ;
|
Result := Format('ns%d',[GetNodeListCount(AWsdlDocument.DocumentElement.Attributes)]) ;
|
||||||
AWsdlDocument.DocumentElement.SetAttribute(Format('%s:%s',[sXMLNS,Result]),ANameSpace);
|
AWsdlDocument.DocumentElement.SetAttribute(Format('%s:%s',[sXMLNS,Result]),ANameSpace);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -786,7 +805,7 @@ begin
|
|||||||
( arrayTypeData^.ClassType.InheritsFrom(TBaseArrayRemotable) )
|
( arrayTypeData^.ClassType.InheritsFrom(TBaseArrayRemotable) )
|
||||||
then begin
|
then begin
|
||||||
GetNameSpaceShortName(typItm.NameSpace);
|
GetNameSpaceShortName(typItm.NameSpace);
|
||||||
defTypesNode := AWsdlDocument.DocumentElement.FindNode(sWSDL_TYPES) as TDOMElement;
|
defTypesNode := FindNode(AWsdlDocument.DocumentElement,sWSDL_TYPES) as TDOMElement;
|
||||||
Assert(Assigned(defTypesNode));
|
Assert(Assigned(defTypesNode));
|
||||||
defSchemaNode := defTypesNode.FirstChild as TDOMElement;
|
defSchemaNode := defTypesNode.FirstChild as TDOMElement;
|
||||||
|
|
||||||
|
44
wst/trunk/samples/delphi/http_server/http_server.cfg
Normal file
44
wst/trunk/samples/delphi/http_server/http_server.cfg
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
-$A8
|
||||||
|
-$B-
|
||||||
|
-$C+
|
||||||
|
-$D+
|
||||||
|
-$E-
|
||||||
|
-$F-
|
||||||
|
-$G+
|
||||||
|
-$H+
|
||||||
|
-$I+
|
||||||
|
-$J-
|
||||||
|
-$K-
|
||||||
|
-$L+
|
||||||
|
-$M-
|
||||||
|
-$N+
|
||||||
|
-$O+
|
||||||
|
-$P+
|
||||||
|
-$Q-
|
||||||
|
-$R-
|
||||||
|
-$S-
|
||||||
|
-$T-
|
||||||
|
-$U-
|
||||||
|
-$V+
|
||||||
|
-$W-
|
||||||
|
-$X+
|
||||||
|
-$YD
|
||||||
|
-$Z1
|
||||||
|
-cg
|
||||||
|
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
-H+
|
||||||
|
-W+
|
||||||
|
-M
|
||||||
|
-$M16384,1048576
|
||||||
|
-K$00400000
|
||||||
|
-N"obj"
|
||||||
|
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-U"..\..\..\;..\..\;..\..\..\wst_rtti_filter"
|
||||||
|
-O"..\..\..\;..\..\;..\..\..\wst_rtti_filter"
|
||||||
|
-I"..\..\..\;..\..\;..\..\..\wst_rtti_filter"
|
||||||
|
-R"..\..\..\;..\..\;..\..\..\wst_rtti_filter"
|
||||||
|
-DINDY_9
|
||||||
|
-w-UNSAFE_TYPE
|
||||||
|
-w-UNSAFE_CODE
|
||||||
|
-w-UNSAFE_CAST
|
159
wst/trunk/samples/delphi/http_server/http_server.dof
Normal file
159
wst/trunk/samples/delphi/http_server/http_server.dof
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
[FileVersion]
|
||||||
|
Version=7.0
|
||||||
|
[Compiler]
|
||||||
|
A=8
|
||||||
|
B=0
|
||||||
|
C=1
|
||||||
|
D=1
|
||||||
|
E=0
|
||||||
|
F=0
|
||||||
|
G=1
|
||||||
|
H=1
|
||||||
|
I=1
|
||||||
|
J=0
|
||||||
|
K=0
|
||||||
|
L=1
|
||||||
|
M=0
|
||||||
|
N=1
|
||||||
|
O=1
|
||||||
|
P=1
|
||||||
|
Q=0
|
||||||
|
R=0
|
||||||
|
S=0
|
||||||
|
T=0
|
||||||
|
U=0
|
||||||
|
V=1
|
||||||
|
W=0
|
||||||
|
X=1
|
||||||
|
Y=1
|
||||||
|
Z=1
|
||||||
|
ShowHints=1
|
||||||
|
ShowWarnings=1
|
||||||
|
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
NamespacePrefix=
|
||||||
|
SymbolDeprecated=1
|
||||||
|
SymbolLibrary=1
|
||||||
|
SymbolPlatform=1
|
||||||
|
UnitLibrary=1
|
||||||
|
UnitPlatform=1
|
||||||
|
UnitDeprecated=1
|
||||||
|
HResultCompat=1
|
||||||
|
HidingMember=1
|
||||||
|
HiddenVirtual=1
|
||||||
|
Garbage=1
|
||||||
|
BoundsError=1
|
||||||
|
ZeroNilCompat=1
|
||||||
|
StringConstTruncated=1
|
||||||
|
ForLoopVarVarPar=1
|
||||||
|
TypedConstVarPar=1
|
||||||
|
AsgToTypedConst=1
|
||||||
|
CaseLabelRange=1
|
||||||
|
ForVariable=1
|
||||||
|
ConstructingAbstract=1
|
||||||
|
ComparisonFalse=1
|
||||||
|
ComparisonTrue=1
|
||||||
|
ComparingSignedUnsigned=1
|
||||||
|
CombiningSignedUnsigned=1
|
||||||
|
UnsupportedConstruct=1
|
||||||
|
FileOpen=1
|
||||||
|
FileOpenUnitSrc=1
|
||||||
|
BadGlobalSymbol=1
|
||||||
|
DuplicateConstructorDestructor=1
|
||||||
|
InvalidDirective=1
|
||||||
|
PackageNoLink=1
|
||||||
|
PackageThreadVar=1
|
||||||
|
ImplicitImport=1
|
||||||
|
HPPEMITIgnored=1
|
||||||
|
NoRetVal=1
|
||||||
|
UseBeforeDef=1
|
||||||
|
ForLoopVarUndef=1
|
||||||
|
UnitNameMismatch=1
|
||||||
|
NoCFGFileFound=1
|
||||||
|
MessageDirective=1
|
||||||
|
ImplicitVariants=1
|
||||||
|
UnicodeToLocale=1
|
||||||
|
LocaleToUnicode=1
|
||||||
|
ImagebaseMultiple=1
|
||||||
|
SuspiciousTypecast=1
|
||||||
|
PrivatePropAccessor=1
|
||||||
|
UnsafeType=0
|
||||||
|
UnsafeCode=0
|
||||||
|
UnsafeCast=0
|
||||||
|
[Linker]
|
||||||
|
MapFile=0
|
||||||
|
OutputObjs=0
|
||||||
|
ConsoleApp=1
|
||||||
|
DebugInfo=0
|
||||||
|
RemoteSymbols=0
|
||||||
|
MinStackSize=16384
|
||||||
|
MaxStackSize=1048576
|
||||||
|
ImageBase=4194304
|
||||||
|
ExeDescription=
|
||||||
|
[Directories]
|
||||||
|
OutputDir=
|
||||||
|
UnitOutputDir=obj
|
||||||
|
PackageDLLOutputDir=
|
||||||
|
PackageDCPOutputDir=
|
||||||
|
SearchPath=..\..\..\;..\..\;..\..\..\wst_rtti_filter
|
||||||
|
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;FIBDBMidas7;Jcl;JclVcl;JvCoreD7R;JvSystemD7R;JvStdCtrlsD7R;JvAppFrmD7R;JvBandsD7R;JvDBD7R;JvDlgsD7R;JvBDED7R;JvCmpD7R;JvCryptD7R;JvCtrlsD7R;JvCustomD7R;JvDockingD7R;JvDotNetCtrlsD7R;JvEDID7R;JvGlobusD7R;JvHMID7R;JvInterpreterD7R;JvJansD7R;JvManagedThreadsD7R;JvMMD7R;JvNetD7R;JvPageCompsD7R;JvPluginD7R;JvPrintPreviewD7R;JvRuntimeDesignD7R;JvTimeFrameworkD7R;JvUIBD7R;JvValidatorsD7R;JvWizardD7R;JvXPCtrlsD7R;dxForumLibD7;cxLibraryVCLD7;cxPageControlVCLD7;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtItemsD7;dxBarExtDBItemsD7;dxsbD7;dxmdsD7;dxdbtrD7;dxtrmdD7;dxorgcD7;dxdborD7;dxEdtrD7;EQTLD7;ECQDBCD7;EQDBTLD7;EQGridD7;dxGrEdD7;dxExELD7;dxELibD7;cxEditorsVCLD7;cxGridVCLD7;dxThemeD7;cxDataD7;cxGridUtilsVCLD7;dxPSCoreD7;dxPsPrVwAdvD7;dxPSLnksD7;dxPSTeeChartD7;dxPSDBTeeChartD7;dxPSdxDBTVLnkD7;dxPSdxOCLnkD7;dxPSdxDBOCLnkD7;dxPScxGridLnkD7;dxPSTLLnkD7;qrpt
|
||||||
|
Conditionals=INDY_9
|
||||||
|
DebugSourceDirs=
|
||||||
|
UsePackages=0
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
HostApplication=
|
||||||
|
Launcher=
|
||||||
|
UseLauncher=0
|
||||||
|
DebugCWD=
|
||||||
|
[Language]
|
||||||
|
ActiveLang=
|
||||||
|
ProjectLang=
|
||||||
|
RootDir=C:\Program Files\Borland\Delphi7\Bin\
|
||||||
|
[Version Info]
|
||||||
|
IncludeVerInfo=0
|
||||||
|
AutoIncBuild=0
|
||||||
|
MajorVer=1
|
||||||
|
MinorVer=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
Debug=0
|
||||||
|
PreRelease=0
|
||||||
|
Special=0
|
||||||
|
Private=0
|
||||||
|
DLL=0
|
||||||
|
Locale=1036
|
||||||
|
CodePage=1252
|
||||||
|
[Version Info Keys]
|
||||||
|
CompanyName=
|
||||||
|
FileDescription=
|
||||||
|
FileVersion=1.0.0.0
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=1.0.0.0
|
||||||
|
Comments=
|
||||||
|
[Excluded Packages]
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPSdxDBTLLnkD7.bpl=ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc.
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPSdxDBGrLnkD7.bpl=ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc.
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPSdxInsLnkD7.bpl=ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc.
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPSdxOILnkD7.bpl=ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc.
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPSdxMVLnkD7.bpl=ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPSdxFCLnkD7.bpl=ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.
|
||||||
|
C:\Program Files\Developer Express Inc\ExpressPrinting System\Delphi 7\Lib\dxPScxSSLnkD7.bpl=ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc.
|
||||||
|
[HistoryLists\hlConditionals]
|
||||||
|
Count=1
|
||||||
|
Item0=INDY_9
|
||||||
|
[HistoryLists\hlUnitAliases]
|
||||||
|
Count=1
|
||||||
|
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
[HistoryLists\hlSearchPath]
|
||||||
|
Count=4
|
||||||
|
Item0=..\..\..\;..\..\;..\..\..\wst_rtti_filter
|
||||||
|
Item1=..\..\..\;..\..\
|
||||||
|
Item2=..\..\..\
|
||||||
|
Item3=..\
|
||||||
|
[HistoryLists\hlUnitOutputDirectory]
|
||||||
|
Count=1
|
||||||
|
Item0=obj
|
40
wst/trunk/samples/delphi/http_server/http_server.dpr
Normal file
40
wst/trunk/samples/delphi/http_server/http_server.dpr
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
program http_server;
|
||||||
|
|
||||||
|
{$APPTYPE CONSOLE}
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils,
|
||||||
|
Classes,
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
ActiveX,
|
||||||
|
{$ENDIF}
|
||||||
|
indy_http_server,
|
||||||
|
metadata_service,
|
||||||
|
logger_extension,
|
||||||
|
wst_delphi_rtti_utils in '..\..\..\wst_delphi_rtti_utils.pas';
|
||||||
|
|
||||||
|
var
|
||||||
|
AppObject : TwstWebApplication;
|
||||||
|
begin
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
CoInitialize(nil);
|
||||||
|
try
|
||||||
|
{$ENDIF}
|
||||||
|
AppObject := TwstWebApplication.Create();
|
||||||
|
try
|
||||||
|
WriteLn('"Web Service Toolkit" HTTP Server sample listening at:');
|
||||||
|
WriteLn('');
|
||||||
|
WriteLn('http://127.0.0.1:8000/');
|
||||||
|
WriteLn('');
|
||||||
|
WriteLn('Press enter to quit.');
|
||||||
|
ReadLn;
|
||||||
|
finally
|
||||||
|
FreeAndNil(AppObject);
|
||||||
|
end;
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
finally
|
||||||
|
CoUninitialize();
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
end.
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<IconPath Value="./"/>
|
<IconPath Value="./"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
<TargetFileExt Value=".exe"/>
|
||||||
<ActiveEditorIndexAtStart Value="0"/>
|
<ActiveEditorIndexAtStart Value="1"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<ProjectVersion Value=""/>
|
||||||
@ -34,33 +34,31 @@
|
|||||||
<PackageName Value="indylaz"/>
|
<PackageName Value="indylaz"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="40">
|
<Units Count="48">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="http_server.pas"/>
|
<Filename Value="http_server.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="http_server"/>
|
<UnitName Value="http_server"/>
|
||||||
<CursorPos X="26" Y="14"/>
|
<CursorPos X="19" Y="10"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="56"/>
|
<UsageCount Value="73"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="app_object.pas"/>
|
<Filename Value="app_object.pas"/>
|
||||||
<UnitName Value="app_object"/>
|
<UnitName Value="app_object"/>
|
||||||
<CursorPos X="41" Y="68"/>
|
<CursorPos X="42" Y="214"/>
|
||||||
<TopLine Value="50"/>
|
<TopLine Value="200"/>
|
||||||
<EditorIndex Value="3"/>
|
<UsageCount Value="36"/>
|
||||||
<UsageCount Value="28"/>
|
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\..\base_service_intf.pas"/>
|
<Filename Value="..\..\base_service_intf.pas"/>
|
||||||
<UnitName Value="base_service_intf"/>
|
<UnitName Value="base_service_intf"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="19"/>
|
<EditorIndex Value="20"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="35"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
@ -68,8 +66,8 @@
|
|||||||
<UnitName Value="metadata_wsdl"/>
|
<UnitName Value="metadata_wsdl"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="21"/>
|
<EditorIndex Value="22"/>
|
||||||
<UsageCount Value="28"/>
|
<UsageCount Value="36"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
@ -78,7 +76,7 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
@ -87,25 +85,25 @@
|
|||||||
<CursorPos X="22" Y="161"/>
|
<CursorPos X="22" Y="161"/>
|
||||||
<TopLine Value="160"/>
|
<TopLine Value="160"/>
|
||||||
<EditorIndex Value="16"/>
|
<EditorIndex Value="16"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="33"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
<Filename Value="..\user_service_intf_binder.pas"/>
|
<Filename Value="..\user_service_intf_binder.pas"/>
|
||||||
<UnitName Value="user_service_intf_binder"/>
|
<UnitName Value="user_service_intf_binder"/>
|
||||||
<CursorPos X="23" Y="291"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="264"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="19"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="..\user_service_intf.pas"/>
|
<Filename Value="..\user_service_intf.pas"/>
|
||||||
<UnitName Value="user_service_intf"/>
|
<UnitName Value="user_service_intf"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="180"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="17"/>
|
<EditorIndex Value="17"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="33"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
@ -113,8 +111,8 @@
|
|||||||
<UnitName Value="metadata_repository"/>
|
<UnitName Value="metadata_repository"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="22"/>
|
<EditorIndex Value="25"/>
|
||||||
<UsageCount Value="28"/>
|
<UsageCount Value="36"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
@ -122,8 +120,8 @@
|
|||||||
<UnitName Value="semaphore"/>
|
<UnitName Value="semaphore"/>
|
||||||
<CursorPos X="2" Y="12"/>
|
<CursorPos X="2" Y="12"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="20"/>
|
<EditorIndex Value="21"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
@ -132,7 +130,7 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="15"/>
|
<EditorIndex Value="15"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="35"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
@ -141,7 +139,7 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="12"/>
|
<EditorIndex Value="12"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="35"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit11>
|
</Unit11>
|
||||||
<Unit12>
|
<Unit12>
|
||||||
@ -150,7 +148,7 @@
|
|||||||
<CursorPos X="17" Y="28"/>
|
<CursorPos X="17" Y="28"/>
|
||||||
<TopLine Value="13"/>
|
<TopLine Value="13"/>
|
||||||
<EditorIndex Value="14"/>
|
<EditorIndex Value="14"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="35"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
@ -158,8 +156,8 @@
|
|||||||
<UnitName Value="server_service_imputils"/>
|
<UnitName Value="server_service_imputils"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="18"/>
|
<EditorIndex Value="19"/>
|
||||||
<UsageCount Value="26"/>
|
<UsageCount Value="34"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
<Unit14>
|
<Unit14>
|
||||||
@ -167,26 +165,26 @@
|
|||||||
<UnitName Value="IdCustomHTTPServer"/>
|
<UnitName Value="IdCustomHTTPServer"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="8"/>
|
<UsageCount Value="7"/>
|
||||||
</Unit14>
|
</Unit14>
|
||||||
<Unit15>
|
<Unit15>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\i386\i386.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\i386\i386.inc"/>
|
||||||
<CursorPos X="49" Y="1252"/>
|
<CursorPos X="49" Y="1252"/>
|
||||||
<TopLine Value="1231"/>
|
<TopLine Value="1231"/>
|
||||||
<UsageCount Value="8"/>
|
<UsageCount Value="7"/>
|
||||||
</Unit15>
|
</Unit15>
|
||||||
<Unit16>
|
<Unit16>
|
||||||
<Filename Value="..\..\wst.inc"/>
|
<Filename Value="..\..\wst.inc"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="7"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit16>
|
</Unit16>
|
||||||
<Unit17>
|
<Unit17>
|
||||||
<Filename Value="..\..\xmlrpc_formatter.pas"/>
|
<Filename Value="..\..\xmlrpc_formatter.pas"/>
|
||||||
<UnitName Value="xmlrpc_formatter"/>
|
<UnitName Value="xmlrpc_formatter"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="28"/>
|
<TopLine Value="28"/>
|
||||||
<UsageCount Value="8"/>
|
<UsageCount Value="7"/>
|
||||||
</Unit17>
|
</Unit17>
|
||||||
<Unit18>
|
<Unit18>
|
||||||
<Filename Value="..\..\server_service_xmlrpc.pas"/>
|
<Filename Value="..\..\server_service_xmlrpc.pas"/>
|
||||||
@ -194,7 +192,7 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="33"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit18>
|
</Unit18>
|
||||||
<Unit19>
|
<Unit19>
|
||||||
@ -203,7 +201,7 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="13"/>
|
<EditorIndex Value="13"/>
|
||||||
<UsageCount Value="23"/>
|
<UsageCount Value="31"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit19>
|
</Unit19>
|
||||||
<Unit20>
|
<Unit20>
|
||||||
@ -212,7 +210,7 @@
|
|||||||
<CursorPos X="18" Y="21"/>
|
<CursorPos X="18" Y="21"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="11"/>
|
<EditorIndex Value="11"/>
|
||||||
<UsageCount Value="23"/>
|
<UsageCount Value="31"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit20>
|
</Unit20>
|
||||||
<Unit21>
|
<Unit21>
|
||||||
@ -220,107 +218,109 @@
|
|||||||
<UnitName Value="IdSocketHandle"/>
|
<UnitName Value="IdSocketHandle"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="8"/>
|
<UsageCount Value="7"/>
|
||||||
</Unit21>
|
</Unit21>
|
||||||
<Unit22>
|
<Unit22>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\lazarus\IdAboutVCL.pas"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\lazarus\IdAboutVCL.pas"/>
|
||||||
<UnitName Value="IdAboutVCL"/>
|
<UnitName Value="IdAboutVCL"/>
|
||||||
<CursorPos X="19" Y="1"/>
|
<CursorPos X="19" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit22>
|
</Unit22>
|
||||||
<Unit23>
|
<Unit23>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\System\IdGlobal.pas"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\System\IdGlobal.pas"/>
|
||||||
<UnitName Value="IdGlobal"/>
|
<UnitName Value="IdGlobal"/>
|
||||||
<CursorPos X="59" Y="982"/>
|
<CursorPos X="59" Y="982"/>
|
||||||
<TopLine Value="981"/>
|
<TopLine Value="981"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit23>
|
</Unit23>
|
||||||
<Unit24>
|
<Unit24>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\systemh.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\systemh.inc"/>
|
||||||
<CursorPos X="12" Y="852"/>
|
<CursorPos X="21" Y="208"/>
|
||||||
<TopLine Value="871"/>
|
<TopLine Value="193"/>
|
||||||
<UsageCount Value="10"/>
|
<EditorIndex Value="24"/>
|
||||||
|
<UsageCount Value="17"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit24>
|
</Unit24>
|
||||||
<Unit25>
|
<Unit25>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\innr.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\innr.inc"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="42"/>
|
<TopLine Value="42"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit25>
|
</Unit25>
|
||||||
<Unit26>
|
<Unit26>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\i386\fastmove.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\i386\fastmove.inc"/>
|
||||||
<CursorPos X="11" Y="835"/>
|
<CursorPos X="11" Y="835"/>
|
||||||
<TopLine Value="821"/>
|
<TopLine Value="821"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="9"/>
|
||||||
</Unit26>
|
</Unit26>
|
||||||
<Unit27>
|
<Unit27>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\system.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\system.inc"/>
|
||||||
<CursorPos X="11" Y="306"/>
|
<CursorPos X="11" Y="306"/>
|
||||||
<TopLine Value="285"/>
|
<TopLine Value="285"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<UsageCount Value="17"/>
|
<UsageCount Value="25"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit27>
|
</Unit27>
|
||||||
<Unit28>
|
<Unit28>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\generic.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\generic.inc"/>
|
||||||
<CursorPos X="5" Y="1289"/>
|
<CursorPos X="5" Y="1289"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="16"/>
|
<UsageCount Value="15"/>
|
||||||
</Unit28>
|
</Unit28>
|
||||||
<Unit29>
|
<Unit29>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\system.fpd"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\system.fpd"/>
|
||||||
<CursorPos X="22" Y="17"/>
|
<CursorPos X="22" Y="17"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit29>
|
</Unit29>
|
||||||
<Unit30>
|
<Unit30>
|
||||||
<Filename Value="..\..\wst_fpc_xml.pas"/>
|
<Filename Value="..\..\wst_fpc_xml.pas"/>
|
||||||
<UnitName Value="wst_fpc_xml"/>
|
<UnitName Value="wst_fpc_xml"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="3"/>
|
||||||
<UsageCount Value="16"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit30>
|
</Unit30>
|
||||||
<Unit31>
|
<Unit31>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstrh.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstrh.inc"/>
|
||||||
<CursorPos X="11" Y="66"/>
|
<CursorPos X="11" Y="66"/>
|
||||||
<TopLine Value="52"/>
|
<TopLine Value="52"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="2"/>
|
||||||
<UsageCount Value="16"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit31>
|
</Unit31>
|
||||||
<Unit32>
|
<Unit32>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstr.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstr.inc"/>
|
||||||
<CursorPos X="6" Y="44"/>
|
<CursorPos X="6" Y="44"/>
|
||||||
<TopLine Value="30"/>
|
<TopLine Value="30"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit32>
|
</Unit32>
|
||||||
<Unit33>
|
<Unit33>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\win\sysosh.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\win\sysosh.inc"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="51"/>
|
<TopLine Value="51"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit33>
|
</Unit33>
|
||||||
<Unit34>
|
<Unit34>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpash.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpash.inc"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="322"/>
|
<TopLine Value="322"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit34>
|
</Unit34>
|
||||||
<Unit35>
|
<Unit35>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\varianth.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\varianth.inc"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit35>
|
</Unit35>
|
||||||
<Unit36>
|
<Unit36>
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\rtti.inc"/>
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\rtti.inc"/>
|
||||||
<CursorPos X="21" Y="77"/>
|
<CursorPos X="21" Y="77"/>
|
||||||
<TopLine Value="77"/>
|
<TopLine Value="5"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<UsageCount Value="16"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit36>
|
</Unit36>
|
||||||
<Unit37>
|
<Unit37>
|
||||||
@ -329,7 +329,7 @@
|
|||||||
<CursorPos X="26" Y="13"/>
|
<CursorPos X="26" Y="13"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="9"/>
|
<EditorIndex Value="9"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit37>
|
</Unit37>
|
||||||
<Unit38>
|
<Unit38>
|
||||||
@ -338,18 +338,113 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="10"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit38>
|
</Unit38>
|
||||||
<Unit39>
|
<Unit39>
|
||||||
<Filename Value="..\user_service_intf.wst"/>
|
<Filename Value="..\user_service_intf.wst"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="9"/>
|
||||||
<SyntaxHighlighter Value="None"/>
|
<SyntaxHighlighter Value="None"/>
|
||||||
</Unit39>
|
</Unit39>
|
||||||
|
<Unit40>
|
||||||
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
||||||
|
<UnitName Value="DOM"/>
|
||||||
|
<CursorPos X="42" Y="228"/>
|
||||||
|
<TopLine Value="215"/>
|
||||||
|
<UsageCount Value="17"/>
|
||||||
|
</Unit40>
|
||||||
|
<Unit41>
|
||||||
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
|
||||||
|
<UnitName Value="typinfo"/>
|
||||||
|
<CursorPos X="46" Y="371"/>
|
||||||
|
<TopLine Value="366"/>
|
||||||
|
<EditorIndex Value="23"/>
|
||||||
|
<UsageCount Value="18"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit41>
|
||||||
|
<Unit42>
|
||||||
|
<Filename Value="..\user_service_intf_proxy.pas"/>
|
||||||
|
<UnitName Value="user_service_intf_proxy"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<EditorIndex Value="18"/>
|
||||||
|
<UsageCount Value="17"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit42>
|
||||||
|
<Unit43>
|
||||||
|
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Protocols\IdCustomHTTPServer.pas"/>
|
||||||
|
<UnitName Value="IdCustomHTTPServer"/>
|
||||||
|
<CursorPos X="14" Y="252"/>
|
||||||
|
<TopLine Value="239"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
</Unit43>
|
||||||
|
<Unit44>
|
||||||
|
<Filename Value="..\..\type_lib_edtr\uabout.pas"/>
|
||||||
|
<ComponentName Value="fAbout"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceFilename Value="..\..\type_lib_edtr\uabout.lrs"/>
|
||||||
|
<UnitName Value="uabout"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
</Unit44>
|
||||||
|
<Unit45>
|
||||||
|
<Filename Value="..\..\type_lib_edtr\uwsttypelibraryedit.pas"/>
|
||||||
|
<ComponentName Value="fWstTypeLibraryEdit"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<UnitName Value="uwsttypelibraryedit"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit45>
|
||||||
|
<Unit46>
|
||||||
|
<Filename Value="..\..\ide\lazarus\wstimportdlg.pas"/>
|
||||||
|
<ComponentName Value="formImport"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceFilename Value="..\..\ide\lazarus\wstimportdlg.lrs"/>
|
||||||
|
<UnitName Value="wstimportdlg"/>
|
||||||
|
<CursorPos X="27" Y="7"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
</Unit46>
|
||||||
|
<Unit47>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<UnitName Value="indy_http_server"/>
|
||||||
|
<CursorPos X="20" Y="20"/>
|
||||||
|
<TopLine Value="8"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit47>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
<JumpHistory Count="6" HistoryIndex="5">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<Caret Line="160" Column="20" TopLine="147"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="28"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<Caret Line="102" Column="11" TopLine="84"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<Caret Line="359" Column="76" TopLine="346"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="..\..\indy_http_server.pas"/>
|
||||||
|
<Caret Line="20" Column="5" TopLine="1"/>
|
||||||
|
</Position6>
|
||||||
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
@ -372,6 +467,7 @@
|
|||||||
<Generate Value="Faster"/>
|
<Generate Value="Faster"/>
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Other>
|
<Other>
|
||||||
|
<CustomOptions Value="-dINDY_10"/>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
@ -7,7 +7,7 @@ uses
|
|||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
app_object, metadata_service, logger_extension;
|
indy_http_server, metadata_service, logger_extension;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
|
@ -10,15 +10,17 @@
|
|||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
}
|
}
|
||||||
|
{$INCLUDE wst_global.inc}
|
||||||
unit logger_extension;
|
unit logger_extension;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, base_service_intf, server_service_intf;
|
Classes, SysUtils, base_service_intf, server_service_intf;
|
||||||
|
|
||||||
|
{$INCLUDE wst.inc}
|
||||||
|
{$INCLUDE wst_delphi.inc}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TLoggerServiceExtension }
|
{ TLoggerServiceExtension }
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<IconPath Value=".\"/>
|
<IconPath Value=".\"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
<TargetFileExt Value=".exe"/>
|
||||||
<ActiveEditorIndexAtStart Value="13"/>
|
<ActiveEditorIndexAtStart Value="2"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<ProjectVersion Value=""/>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<Filename Value="user_client_console.pas"/>
|
<Filename Value="user_client_console.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="user_client_console"/>
|
<UnitName Value="user_client_console"/>
|
||||||
<CursorPos X="64" Y="30"/>
|
<CursorPos X="15" Y="9"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="64"/>
|
<UsageCount Value="64"/>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<UnitName Value="user_service_intf_proxy"/>
|
<UnitName Value="user_service_intf_proxy"/>
|
||||||
<CursorPos X="74" Y="12"/>
|
<CursorPos X="74" Y="12"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="9"/>
|
||||||
<UsageCount Value="30"/>
|
<UsageCount Value="30"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -54,8 +54,8 @@
|
|||||||
<Filename Value="..\..\synapse_tcp_protocol.pas"/>
|
<Filename Value="..\..\synapse_tcp_protocol.pas"/>
|
||||||
<UnitName Value="synapse_tcp_protocol"/>
|
<UnitName Value="synapse_tcp_protocol"/>
|
||||||
<CursorPos X="29" Y="132"/>
|
<CursorPos X="29" Y="132"/>
|
||||||
<TopLine Value="101"/>
|
<TopLine Value="5"/>
|
||||||
<EditorIndex Value="13"/>
|
<EditorIndex Value="15"/>
|
||||||
<UsageCount Value="32"/>
|
<UsageCount Value="32"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<UnitName Value="user_service_intf"/>
|
<UnitName Value="user_service_intf"/>
|
||||||
<CursorPos X="53" Y="11"/>
|
<CursorPos X="53" Y="11"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="4"/>
|
||||||
<UsageCount Value="29"/>
|
<UsageCount Value="29"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<UnitName Value="base_service_intf"/>
|
<UnitName Value="base_service_intf"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="6"/>
|
||||||
<UsageCount Value="32"/>
|
<UsageCount Value="32"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<UnitName Value="library_protocol"/>
|
<UnitName Value="library_protocol"/>
|
||||||
<CursorPos X="1" Y="13"/>
|
<CursorPos X="1" Y="13"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="7"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
@ -140,9 +140,11 @@
|
|||||||
<Unit14>
|
<Unit14>
|
||||||
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||||
<UnitName Value="synapse_http_protocol"/>
|
<UnitName Value="synapse_http_protocol"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="19" Y="16"/>
|
||||||
<TopLine Value="22"/>
|
<TopLine Value="3"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
<UsageCount Value="14"/>
|
<UsageCount Value="14"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit14>
|
</Unit14>
|
||||||
<Unit15>
|
<Unit15>
|
||||||
<Filename Value="..\..\metadata_repository.pas"/>
|
<Filename Value="..\..\metadata_repository.pas"/>
|
||||||
@ -180,9 +182,11 @@
|
|||||||
<Unit20>
|
<Unit20>
|
||||||
<Filename Value="..\..\soap_formatter.pas"/>
|
<Filename Value="..\..\soap_formatter.pas"/>
|
||||||
<UnitName Value="soap_formatter"/>
|
<UnitName Value="soap_formatter"/>
|
||||||
<CursorPos X="21" Y="42"/>
|
<CursorPos X="8" Y="96"/>
|
||||||
<TopLine Value="46"/>
|
<TopLine Value="83"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
<UsageCount Value="17"/>
|
<UsageCount Value="17"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit20>
|
</Unit20>
|
||||||
<Unit21>
|
<Unit21>
|
||||||
<Filename Value="..\..\xmlrpc_formatter.pas"/>
|
<Filename Value="..\..\xmlrpc_formatter.pas"/>
|
||||||
@ -190,7 +194,7 @@
|
|||||||
<UnitName Value="xmlrpc_formatter"/>
|
<UnitName Value="xmlrpc_formatter"/>
|
||||||
<CursorPos X="25" Y="72"/>
|
<CursorPos X="25" Y="72"/>
|
||||||
<TopLine Value="65"/>
|
<TopLine Value="65"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="8"/>
|
||||||
<UsageCount Value="50"/>
|
<UsageCount Value="50"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit21>
|
</Unit21>
|
||||||
@ -199,7 +203,7 @@
|
|||||||
<UnitName Value="binary_formatter"/>
|
<UnitName Value="binary_formatter"/>
|
||||||
<CursorPos X="20" Y="21"/>
|
<CursorPos X="20" Y="21"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="9"/>
|
<EditorIndex Value="11"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="25"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit22>
|
</Unit22>
|
||||||
@ -214,7 +218,7 @@
|
|||||||
<UnitName Value="base_xmlrpc_formatter"/>
|
<UnitName Value="base_xmlrpc_formatter"/>
|
||||||
<CursorPos X="20" Y="1346"/>
|
<CursorPos X="20" Y="1346"/>
|
||||||
<TopLine Value="1326"/>
|
<TopLine Value="1326"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="10"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="25"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit24>
|
</Unit24>
|
||||||
@ -223,7 +227,7 @@
|
|||||||
<UnitName Value="base_soap_formatter"/>
|
<UnitName Value="base_soap_formatter"/>
|
||||||
<CursorPos X="56" Y="334"/>
|
<CursorPos X="56" Y="334"/>
|
||||||
<TopLine Value="319"/>
|
<TopLine Value="319"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="5"/>
|
||||||
<UsageCount Value="24"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit25>
|
</Unit25>
|
||||||
@ -259,7 +263,7 @@
|
|||||||
<UnitName Value="imp_utils"/>
|
<UnitName Value="imp_utils"/>
|
||||||
<CursorPos X="26" Y="13"/>
|
<CursorPos X="26" Y="13"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="3"/>
|
||||||
<UsageCount Value="15"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit30>
|
</Unit30>
|
||||||
@ -268,7 +272,7 @@
|
|||||||
<UnitName Value="wst_fpc_xml"/>
|
<UnitName Value="wst_fpc_xml"/>
|
||||||
<CursorPos X="34" Y="67"/>
|
<CursorPos X="34" Y="67"/>
|
||||||
<TopLine Value="54"/>
|
<TopLine Value="54"/>
|
||||||
<EditorIndex Value="11"/>
|
<EditorIndex Value="13"/>
|
||||||
<UsageCount Value="15"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit31>
|
</Unit31>
|
||||||
@ -284,7 +288,7 @@
|
|||||||
<UnitName Value="base_binary_formatter"/>
|
<UnitName Value="base_binary_formatter"/>
|
||||||
<CursorPos X="35" Y="1496"/>
|
<CursorPos X="35" Y="1496"/>
|
||||||
<TopLine Value="1483"/>
|
<TopLine Value="1483"/>
|
||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="12"/>
|
||||||
<UsageCount Value="14"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit33>
|
</Unit33>
|
||||||
@ -293,133 +297,12 @@
|
|||||||
<UnitName Value="DOM"/>
|
<UnitName Value="DOM"/>
|
||||||
<CursorPos X="14" Y="287"/>
|
<CursorPos X="14" Y="287"/>
|
||||||
<TopLine Value="274"/>
|
<TopLine Value="274"/>
|
||||||
<EditorIndex Value="12"/>
|
<EditorIndex Value="14"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit34>
|
</Unit34>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||||
<Position1>
|
|
||||||
<Filename Value="..\..\wst_fpc_xml.pas"/>
|
|
||||||
<Caret Line="67" Column="34" TopLine="54"/>
|
|
||||||
</Position1>
|
|
||||||
<Position2>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="304" Column="36" TopLine="298"/>
|
|
||||||
</Position2>
|
|
||||||
<Position3>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="249" Column="54" TopLine="236"/>
|
|
||||||
</Position3>
|
|
||||||
<Position4>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="320" Column="63" TopLine="307"/>
|
|
||||||
</Position4>
|
|
||||||
<Position5>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="345" Column="58" TopLine="332"/>
|
|
||||||
</Position5>
|
|
||||||
<Position6>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="347" Column="60" TopLine="334"/>
|
|
||||||
</Position6>
|
|
||||||
<Position7>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="449" Column="66" TopLine="436"/>
|
|
||||||
</Position7>
|
|
||||||
<Position8>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="541" Column="58" TopLine="528"/>
|
|
||||||
</Position8>
|
|
||||||
<Position9>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="543" Column="62" TopLine="530"/>
|
|
||||||
</Position9>
|
|
||||||
<Position10>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="544" Column="62" TopLine="531"/>
|
|
||||||
</Position10>
|
|
||||||
<Position11>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="546" Column="66" TopLine="533"/>
|
|
||||||
</Position11>
|
|
||||||
<Position12>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="548" Column="58" TopLine="535"/>
|
|
||||||
</Position12>
|
|
||||||
<Position13>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="968" Column="3" TopLine="966"/>
|
|
||||||
</Position13>
|
|
||||||
<Position14>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="1357" Column="75" TopLine="1344"/>
|
|
||||||
</Position14>
|
|
||||||
<Position15>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="1360" Column="22" TopLine="1347"/>
|
|
||||||
</Position15>
|
|
||||||
<Position16>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="1465" Column="71" TopLine="1452"/>
|
|
||||||
</Position16>
|
|
||||||
<Position17>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="1532" Column="74" TopLine="1519"/>
|
|
||||||
</Position17>
|
|
||||||
<Position18>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="1862" Column="75" TopLine="1849"/>
|
|
||||||
</Position18>
|
|
||||||
<Position19>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="1864" Column="65" TopLine="1851"/>
|
|
||||||
</Position19>
|
|
||||||
<Position20>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2038" Column="66" TopLine="2025"/>
|
|
||||||
</Position20>
|
|
||||||
<Position21>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2045" Column="63" TopLine="2032"/>
|
|
||||||
</Position21>
|
|
||||||
<Position22>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2074" Column="12" TopLine="2061"/>
|
|
||||||
</Position22>
|
|
||||||
<Position23>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2104" Column="70" TopLine="2091"/>
|
|
||||||
</Position23>
|
|
||||||
<Position24>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2107" Column="65" TopLine="2094"/>
|
|
||||||
</Position24>
|
|
||||||
<Position25>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2148" Column="74" TopLine="2135"/>
|
|
||||||
</Position25>
|
|
||||||
<Position26>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2150" Column="65" TopLine="2137"/>
|
|
||||||
</Position26>
|
|
||||||
<Position27>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2159" Column="66" TopLine="2146"/>
|
|
||||||
</Position27>
|
|
||||||
<Position28>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2171" Column="22" TopLine="2170"/>
|
|
||||||
</Position28>
|
|
||||||
<Position29>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="2172" Column="26" TopLine="2158"/>
|
|
||||||
</Position29>
|
|
||||||
<Position30>
|
|
||||||
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
|
|
||||||
<Caret Line="258" Column="23" TopLine="245"/>
|
|
||||||
</Position30>
|
|
||||||
</JumpHistory>
|
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
|
200
wst/trunk/samples/user_client_readbuffer/readbuffer_sample.lpi
Normal file
200
wst/trunk/samples/user_client_readbuffer/readbuffer_sample.lpi
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Version Value="5"/>
|
||||||
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||||
|
<MainUnitHasCreateFormStatements Value="False"/>
|
||||||
|
<MainUnitHasTitleStatement Value="False"/>
|
||||||
|
</Flags>
|
||||||
|
<MainUnit Value="0"/>
|
||||||
|
<IconPath Value="./"/>
|
||||||
|
<TargetFileExt Value=".exe"/>
|
||||||
|
<ActiveEditorIndexAtStart Value="0"/>
|
||||||
|
</General>
|
||||||
|
<VersionInfo>
|
||||||
|
<ProjectVersion Value=""/>
|
||||||
|
<Language Value=""/>
|
||||||
|
<CharSet Value=""/>
|
||||||
|
</VersionInfo>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
<IgnoreBinaries Value="False"/>
|
||||||
|
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||||
|
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<local>
|
||||||
|
<FormatVersion Value="1"/>
|
||||||
|
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||||
|
</local>
|
||||||
|
</RunParams>
|
||||||
|
<Units Count="5">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="readbuffer_sample.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="readbuffer_sample"/>
|
||||||
|
<CursorPos X="1" Y="27"/>
|
||||||
|
<TopLine Value="6"/>
|
||||||
|
<EditorIndex Value="0"/>
|
||||||
|
<UsageCount Value="25"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="user_service_intf"/>
|
||||||
|
<CursorPos X="1" Y="27"/>
|
||||||
|
<TopLine Value="23"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<UsageCount Value="25"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="user_service_intf_proxy.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="user_service_intf_proxy"/>
|
||||||
|
<CursorPos X="71" Y="12"/>
|
||||||
|
<TopLine Value="10"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
|
<UsageCount Value="25"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="..\..\base_service_intf.pas"/>
|
||||||
|
<UnitName Value="base_service_intf"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<UsageCount Value="12"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit3>
|
||||||
|
<Unit4>
|
||||||
|
<Filename Value="..\..\synapse_tcp_protocol.pas"/>
|
||||||
|
<UnitName Value="synapse_tcp_protocol"/>
|
||||||
|
<CursorPos X="12" Y="29"/>
|
||||||
|
<TopLine Value="16"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<UsageCount Value="12"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit4>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory Count="16" HistoryIndex="15">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="user_service_intf_proxy.pas"/>
|
||||||
|
<Caret Line="12" Column="71" TopLine="10"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<Caret Line="27" Column="25" TopLine="17"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<Caret Line="29" Column="21" TopLine="14"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<Caret Line="299" Column="8" TopLine="270"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<Caret Line="50" Column="38" TopLine="35"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="..\..\base_service_intf.pas"/>
|
||||||
|
<Caret Line="317" Column="40" TopLine="301"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="..\..\base_service_intf.pas"/>
|
||||||
|
<Caret Line="304" Column="40" TopLine="288"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<Caret Line="52" Column="3" TopLine="50"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="..\..\synapse_tcp_protocol.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="..\..\synapse_tcp_protocol.pas"/>
|
||||||
|
<Caret Line="29" Column="12" TopLine="13"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="readbuffer_sample.pas"/>
|
||||||
|
<Caret Line="269" Column="1" TopLine="237"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="readbuffer_sample.pas"/>
|
||||||
|
<Caret Line="27" Column="44" TopLine="14"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="..\..\base_service_intf.pas"/>
|
||||||
|
<Caret Line="4431" Column="1" TopLine="4386"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="user_service_intf.pas"/>
|
||||||
|
<Caret Line="273" Column="1" TopLine="267"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="readbuffer_sample.pas"/>
|
||||||
|
<Caret Line="58" Column="18" TopLine="46"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="readbuffer_sample.pas"/>
|
||||||
|
<Caret Line="46" Column="11" TopLine="22"/>
|
||||||
|
</Position16>
|
||||||
|
</JumpHistory>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="5"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<SearchPaths>
|
||||||
|
<OtherUnitFiles Value="..\;..\..\;$(LazarusDir)\others_package\synapse\"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<CodeGeneration>
|
||||||
|
<Generate Value="Faster"/>
|
||||||
|
</CodeGeneration>
|
||||||
|
<Other>
|
||||||
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
|
</Other>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<BreakPoints Count="4">
|
||||||
|
<Item1>
|
||||||
|
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
|
||||||
|
<Line Value="230"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
|
||||||
|
<Line Value="193"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
|
||||||
|
<Line Value="198"/>
|
||||||
|
</Item3>
|
||||||
|
<Item4>
|
||||||
|
<Source Value="..\..\ws_helper\wsdl2pas_imp.pas"/>
|
||||||
|
<Line Value="606"/>
|
||||||
|
</Item4>
|
||||||
|
</BreakPoints>
|
||||||
|
<Watches Count="2">
|
||||||
|
<Item1>
|
||||||
|
<Expression Value="locStrFilter"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Expression Value="i"/>
|
||||||
|
</Item2>
|
||||||
|
</Watches>
|
||||||
|
<Exceptions Count="2">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item2>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
269
wst/trunk/samples/user_client_readbuffer/readbuffer_sample.pas
Normal file
269
wst/trunk/samples/user_client_readbuffer/readbuffer_sample.pas
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
program readbuffer_sample;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, TypInfo,
|
||||||
|
user_service_intf_proxy,
|
||||||
|
synapse_tcp_protocol, synapse_http_protocol, library_protocol,
|
||||||
|
soap_formatter, binary_formatter,
|
||||||
|
user_service_intf, xmlrpc_formatter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TUser = TUser_Type;
|
||||||
|
TUserCategory = TUserCategory_Type;
|
||||||
|
|
||||||
|
var
|
||||||
|
UserServiceInst : UserService;
|
||||||
|
|
||||||
|
procedure ShowUser(AUser : TUser);
|
||||||
|
begin
|
||||||
|
if ( AUser <> nil ) then begin
|
||||||
|
WriteLn(' Name = ',AUser.UserName);
|
||||||
|
WriteLn(' Category = ',GetEnumName(TypeInfo(TUserCategory),Ord(AUser.Category)));
|
||||||
|
WriteLn(' e-Mail = ',AUser.eMail);
|
||||||
|
WriteLn(' Preferences = ',AUser.Preferences);
|
||||||
|
WriteLn(' Note = ',AUser.Note.Data);
|
||||||
|
{WriteLn(' Author = ',AUser.Note.Author);
|
||||||
|
WriteLn(' Date = ',AUser.Note.Date);}
|
||||||
|
end else begin
|
||||||
|
WriteLn('<Empty User>');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ShowUserArray(AArray : TUserArray);
|
||||||
|
var
|
||||||
|
i, c : Integer;
|
||||||
|
usr : TUser;
|
||||||
|
begin
|
||||||
|
if ( AArray <> nil ) then begin
|
||||||
|
c := AArray.Length;
|
||||||
|
for i := 0 to Pred(c) do begin
|
||||||
|
usr := AArray[i];
|
||||||
|
WriteLn();
|
||||||
|
WriteLn(Format('User[%d] : ',[(i+1)]));
|
||||||
|
ShowUser(usr);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HandleShowAll();
|
||||||
|
var
|
||||||
|
userArray : TUserArray;
|
||||||
|
begin
|
||||||
|
userArray := UserServiceInst.GetList();
|
||||||
|
try
|
||||||
|
if ( userArray <> nil ) and ( userArray.Length > 0 ) then begin
|
||||||
|
ShowUserArray(userArray);
|
||||||
|
end else begin
|
||||||
|
WriteLn('Empty Array.');
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FreeAndNil(userArray);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
type TAddType = ( atAdd, atUpdate );
|
||||||
|
procedure HandleAdd(const AType :TAddType);
|
||||||
|
const CAPTIONS : array[TAddType] of string = ( 'Adding a user :', 'Updating a user :' );
|
||||||
|
function ReadItem(const APrompt : string; const ANonNull : Boolean):string ;
|
||||||
|
begin
|
||||||
|
Result := '';
|
||||||
|
Write(APrompt);
|
||||||
|
ReadLn(Result);
|
||||||
|
Result := Trim(Result);
|
||||||
|
if ANonNull and ( Length(Result) = 0 ) then
|
||||||
|
Raise Exception.Create('Invalid User Name!');
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
usr : TUser;
|
||||||
|
buff : string;
|
||||||
|
begin
|
||||||
|
buff := '';
|
||||||
|
WriteLn(CAPTIONS[AType]);
|
||||||
|
try
|
||||||
|
usr := TUser.Create();
|
||||||
|
try
|
||||||
|
usr.UserName := ReadItem('Enter user name : ',True);
|
||||||
|
buff := UpperCase(ReadItem('Enter user Category( A : Admin; N : normal ) : ',True));
|
||||||
|
if ( buff[1] = 'A' ) then
|
||||||
|
usr.Category:= Admin
|
||||||
|
else
|
||||||
|
usr.Category:= Normal;
|
||||||
|
usr.eMail := ReadItem('Enter user e-mail : ',False);
|
||||||
|
usr.Preferences := ReadItem('Enter user Preferences : ',False);
|
||||||
|
buff := UpperCase(ReadItem('Do you want to add some notes : ',True));
|
||||||
|
if ( buff[1] = 'O' ) then begin
|
||||||
|
usr.Note.Data := ReadItem('Enter user Note : ',False);
|
||||||
|
{usr.Note.Author := ReadItem('Enter user Note.Author : ',False);
|
||||||
|
usr.Note.Date := ReadItem('Enter user Note.Date : ',False);}
|
||||||
|
end;
|
||||||
|
if ( AType = atUpdate ) then
|
||||||
|
UserServiceInst.Update(usr)
|
||||||
|
else
|
||||||
|
UserServiceInst.Add(usr);
|
||||||
|
finally
|
||||||
|
FreeAndNil(usr);
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
on e : Exception do begin
|
||||||
|
WriteLn(e.Message);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HandleFindUser();
|
||||||
|
var
|
||||||
|
user : TUser;
|
||||||
|
buff : string;
|
||||||
|
begin
|
||||||
|
Write('Enter User Name : ');
|
||||||
|
ReadLn(buff);
|
||||||
|
user := UserServiceInst.Find(buff);
|
||||||
|
try
|
||||||
|
ShowUser(user);
|
||||||
|
finally
|
||||||
|
FreeAndNil(user);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HandleDeleteUser();
|
||||||
|
var
|
||||||
|
buff : string;
|
||||||
|
begin
|
||||||
|
Write('Enter User Name : ');
|
||||||
|
ReadLn(buff);
|
||||||
|
UserServiceInst.Delete(buff);
|
||||||
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
TTransportType = ( ttLibrary, ttTCP, ttHTTP );
|
||||||
|
TFormatType = ( ftBinary, ftSoap, ftXmlRPC );
|
||||||
|
var
|
||||||
|
TransportType : TTransportType;
|
||||||
|
FormatValue : TFormatType;
|
||||||
|
procedure CreateProxy();
|
||||||
|
const ADDRESS_MAP : array[TTransportType] of string = (
|
||||||
|
'LIB:FileName=..\library_server\lib_server.dll;target=UserService',
|
||||||
|
'TCP:Address=127.0.0.1;Port=1234;target=UserService',
|
||||||
|
//'http:Address=http://127.0.0.1:8080/wst/services/UserService/?format=soap'
|
||||||
|
'http:Address=http://127.0.0.1:8000/services/UserService'
|
||||||
|
);
|
||||||
|
FORMAT_MAP : array[TFormatType] of string =( 'binary', 'soap', 'xmlrpc' );
|
||||||
|
var
|
||||||
|
buff : string;
|
||||||
|
begin
|
||||||
|
if ( TransportType = ttHTTP ) then
|
||||||
|
buff := Format('%s/?format=%s',[ADDRESS_MAP[TransportType],FORMAT_MAP[FormatValue]])
|
||||||
|
else
|
||||||
|
buff := ADDRESS_MAP[TransportType];
|
||||||
|
if ( TransportType = ttLibrary ) then
|
||||||
|
buff := StringReplace(buff,'\',DirectorySeparator,[rfReplaceAll, rfIgnoreCase]);
|
||||||
|
UserServiceInst := TUserService_Proxy.Create(
|
||||||
|
'UserService',
|
||||||
|
FORMAT_MAP[FormatValue] + ':',
|
||||||
|
buff
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ReadTransportType();
|
||||||
|
var
|
||||||
|
buff : string;
|
||||||
|
begin
|
||||||
|
WriteLn();
|
||||||
|
WriteLn('Select a transport protocol : ');
|
||||||
|
WriteLn(' L : Library, the lib_server project must have been built');
|
||||||
|
WriteLn(' T : TCP, the tcp_server must have been built');
|
||||||
|
WriteLn(' H : HTTP, the http_server must have been built');
|
||||||
|
WriteLn();
|
||||||
|
Write('Your selection : ');
|
||||||
|
while True do begin
|
||||||
|
ReadLn(buff);
|
||||||
|
buff := UpperCase(Trim(buff));
|
||||||
|
if ( Length(buff) > 0 ) and ( buff[1] in ['L','T', 'H'] ) then begin
|
||||||
|
case buff[1] of
|
||||||
|
'L' : TransportType := ttLibrary;
|
||||||
|
'T' : TransportType := ttTCP;
|
||||||
|
'H' : TransportType := ttHTTP;
|
||||||
|
end;
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ReadFormatType();
|
||||||
|
var
|
||||||
|
buff : string;
|
||||||
|
begin
|
||||||
|
WriteLn();
|
||||||
|
WriteLn('Select a messaging format : ');
|
||||||
|
WriteLn(' B : binary ( binary_formatter.pas )');
|
||||||
|
WriteLn(' S : soap ( soap_formatter.pas )');
|
||||||
|
WriteLn(' X : XmlRpc ( xmlrpc_formatter.pas )');
|
||||||
|
WriteLn();
|
||||||
|
Write('Your selection : ');
|
||||||
|
while True do begin
|
||||||
|
ReadLn(buff);
|
||||||
|
buff := UpperCase(Trim(buff));
|
||||||
|
if ( Length(buff) > 0 ) and ( buff[1] in ['B','S', 'X'] ) then begin
|
||||||
|
case buff[1] of
|
||||||
|
'B' : FormatValue := ftBinary;
|
||||||
|
'S' : FormatValue := ftSoap;
|
||||||
|
'X' : FormatValue := ftXmlRPC;
|
||||||
|
end;
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
strBuffer : string;
|
||||||
|
begin
|
||||||
|
SYNAPSE_RegisterTCP_Transport();
|
||||||
|
SYNAPSE_RegisterHTTP_Transport();
|
||||||
|
LIB_Register_Transport();
|
||||||
|
WriteLn('Sample Application using Web Services Toolkit');
|
||||||
|
ReadFormatType();
|
||||||
|
ReadTransportType();
|
||||||
|
CreateProxy();
|
||||||
|
WriteLn('Menu :');
|
||||||
|
WriteLn(' L : Show the user list');
|
||||||
|
WriteLn(' A : Add a new user');
|
||||||
|
WriteLn(' U : Update a user');
|
||||||
|
WriteLn(' D : Delete a user');
|
||||||
|
WriteLn(' F : Find a new');
|
||||||
|
WriteLn(' C : Change the communication protocol');
|
||||||
|
WriteLn(' Z : Change the messaging format');
|
||||||
|
WriteLn(' X : Exit');
|
||||||
|
WriteLn();
|
||||||
|
Write('Choose a item : ');
|
||||||
|
while True do begin
|
||||||
|
strBuffer := '';
|
||||||
|
ReadLn(strBuffer);
|
||||||
|
strBuffer := UpperCase(Trim(strBuffer));
|
||||||
|
if ( Length(strBuffer) > 0 ) then begin
|
||||||
|
case strBuffer[1] of
|
||||||
|
'L' : HandleShowAll();
|
||||||
|
'A' : HandleAdd(atAdd);
|
||||||
|
'U' : HandleAdd(atUpdate);
|
||||||
|
'D' : HandleDeleteUser();
|
||||||
|
'F' : HandleFindUser();
|
||||||
|
'C' :
|
||||||
|
begin
|
||||||
|
ReadTransportType();
|
||||||
|
CreateProxy();
|
||||||
|
end;
|
||||||
|
'Z' :
|
||||||
|
begin
|
||||||
|
ReadFormatType();
|
||||||
|
CreateProxy();
|
||||||
|
end;
|
||||||
|
'X' : Break;
|
||||||
|
end;
|
||||||
|
WriteLn();
|
||||||
|
Write('Choose a item : ');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
271
wst/trunk/samples/user_client_readbuffer/user_service_intf.pas
Normal file
271
wst/trunk/samples/user_client_readbuffer/user_service_intf.pas
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
{
|
||||||
|
This unit has been produced by ws_helper.
|
||||||
|
Input unit name : "user_service_intf".
|
||||||
|
This unit name : "user_service_intf".
|
||||||
|
Date : "12/07/2007 11:50:48".
|
||||||
|
}
|
||||||
|
unit user_service_intf;
|
||||||
|
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses SysUtils, Classes, TypInfo, base_service_intf, service_intf;
|
||||||
|
|
||||||
|
const
|
||||||
|
sNAME_SPACE = 'urn:UserService';
|
||||||
|
sUNIT_NAME = 'user_service_intf';
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
TUserArray = class;
|
||||||
|
TUser_Type = class;
|
||||||
|
|
||||||
|
TUserCategory_Type = (
|
||||||
|
Normal
|
||||||
|
,Admin
|
||||||
|
);
|
||||||
|
|
||||||
|
{ TUser_Type }
|
||||||
|
|
||||||
|
TUser_Type = class(TBaseComplexRemotable)
|
||||||
|
private
|
||||||
|
FCategory : TUserCategory_Type;
|
||||||
|
FUserName : string;
|
||||||
|
FeMail : string;
|
||||||
|
FPreferences : string;
|
||||||
|
FNote : TStringBufferRemotable;
|
||||||
|
public
|
||||||
|
constructor Create();override;
|
||||||
|
destructor Destroy();override;
|
||||||
|
published
|
||||||
|
property Category : TUserCategory_Type read FCategory write FCategory;
|
||||||
|
property UserName : string read FUserName write FUserName;
|
||||||
|
property eMail : string read FeMail write FeMail;
|
||||||
|
property Preferences : string read FPreferences write FPreferences;
|
||||||
|
property Note : TStringBufferRemotable read FNote write FNote;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TUserArray = class(TBaseObjectArrayRemotable)
|
||||||
|
private
|
||||||
|
function GetItem(AIndex: Integer): TUser_Type;
|
||||||
|
public
|
||||||
|
class function GetItemClass():TBaseRemotableClass;override;
|
||||||
|
property Item[AIndex:Integer] : TUser_Type Read GetItem;Default;
|
||||||
|
end;
|
||||||
|
|
||||||
|
UserService = interface(IInvokable)
|
||||||
|
['{F49D8FA4-9BBC-4321-9869-5BA745070ABC}']
|
||||||
|
function GetList():TUserArray;
|
||||||
|
procedure Add(
|
||||||
|
const AUser : TUser_Type
|
||||||
|
);
|
||||||
|
procedure Update(
|
||||||
|
const AUser : TUser_Type
|
||||||
|
);
|
||||||
|
function Find(
|
||||||
|
const AName : string
|
||||||
|
):TUser_Type;
|
||||||
|
function Delete(
|
||||||
|
const AName : string
|
||||||
|
):boolean;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Register_user_service_intf_ServiceMetadata();
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
uses metadata_repository;
|
||||||
|
|
||||||
|
{ TUserArray }
|
||||||
|
|
||||||
|
function TUserArray.GetItem(AIndex: Integer): TUser_Type;
|
||||||
|
begin
|
||||||
|
Result := Inherited GetItem(AIndex) As TUser_Type;
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TUserArray.GetItemClass(): TBaseRemotableClass;
|
||||||
|
begin
|
||||||
|
Result:= TUser_Type;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure Register_user_service_intf_ServiceMetadata();
|
||||||
|
var
|
||||||
|
mm : IModuleMetadataMngr;
|
||||||
|
begin
|
||||||
|
mm := GetModuleMetadataMngr();
|
||||||
|
mm.SetRepositoryNameSpace(sUNIT_NAME, sNAME_SPACE);
|
||||||
|
mm.SetServiceCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'TRANSPORT_Address',
|
||||||
|
'http://127.0.0.1:8000/services/UserService'
|
||||||
|
);
|
||||||
|
mm.SetServiceCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'FORMAT_Style',
|
||||||
|
'rpc'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'GetList',
|
||||||
|
'_E_N_',
|
||||||
|
'GetList'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'GetList',
|
||||||
|
'TRANSPORT_soapAction',
|
||||||
|
'urn:UserService/UserServiceGetList'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'GetList',
|
||||||
|
'FORMAT_Input_EncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'GetList',
|
||||||
|
'FORMAT_OutputEncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Add',
|
||||||
|
'_E_N_',
|
||||||
|
'Add'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Add',
|
||||||
|
'TRANSPORT_soapAction',
|
||||||
|
'urn:UserService/UserServiceAdd'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Add',
|
||||||
|
'FORMAT_Input_EncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Add',
|
||||||
|
'FORMAT_OutputEncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Update',
|
||||||
|
'_E_N_',
|
||||||
|
'Update'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Update',
|
||||||
|
'TRANSPORT_soapAction',
|
||||||
|
'urn:UserService/UserServiceUpdate'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Update',
|
||||||
|
'FORMAT_Input_EncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Update',
|
||||||
|
'FORMAT_OutputEncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Find',
|
||||||
|
'_E_N_',
|
||||||
|
'Find'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Find',
|
||||||
|
'TRANSPORT_soapAction',
|
||||||
|
'urn:UserService/UserServiceFind'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Find',
|
||||||
|
'FORMAT_Input_EncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Find',
|
||||||
|
'FORMAT_OutputEncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Delete',
|
||||||
|
'_E_N_',
|
||||||
|
'Delete'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Delete',
|
||||||
|
'TRANSPORT_soapAction',
|
||||||
|
'urn:UserService/UserServiceDelete'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Delete',
|
||||||
|
'FORMAT_Input_EncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Delete',
|
||||||
|
'FORMAT_OutputEncodingStyle',
|
||||||
|
'literal'
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TUser_Type }
|
||||||
|
|
||||||
|
constructor TUser_Type.Create( );
|
||||||
|
begin
|
||||||
|
inherited Create( );
|
||||||
|
FNote := TStringBufferRemotable.Create();
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TUser_Type.Destroy( );
|
||||||
|
begin
|
||||||
|
FreeAndNil(FNote);
|
||||||
|
inherited Destroy( );
|
||||||
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUserCategory_Type),'TUserCategory');
|
||||||
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUser_Type),'TUser');
|
||||||
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUserArray),'TUserArray');
|
||||||
|
GetTypeRegistry().ItemByTypeInfo[TypeInfo(TUserArray)].RegisterExternalPropertyName(sARRAY_ITEM,'item');
|
||||||
|
|
||||||
|
|
||||||
|
End.
|
@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<definitions name="urn:UserService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:UserService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="urn:UserService">
|
||||||
|
<types>
|
||||||
|
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:UserService">
|
||||||
|
<xsd:complexType name="TUserArray">
|
||||||
|
<xsd:sequence><xsd:element name="item" type="tns:TUser" maxOccurs="unbounded" minOccurs="0"/></xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="TUser">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Category" type="tns:TUserCategory" maxOccurs="1" minOccurs="1"/>
|
||||||
|
<xsd:element name="UserName" type="xsd:string" maxOccurs="1" minOccurs="1"/>
|
||||||
|
<xsd:element name="eMail" type="xsd:string" maxOccurs="1" minOccurs="1"/>
|
||||||
|
<xsd:element name="Preferences" type="xsd:string" maxOccurs="1" minOccurs="1"/>
|
||||||
|
<xsd:element name="Note" type="xsd:string" maxOccurs="1" minOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:simpleType name="TUserCategory">
|
||||||
|
<xsd:restriction base="xsd:string">
|
||||||
|
<xsd:enumeration value="Normal"/>
|
||||||
|
<xsd:enumeration value="Admin"/>
|
||||||
|
</xsd:restriction>
|
||||||
|
</xsd:simpleType>
|
||||||
|
</xsd:schema>
|
||||||
|
</types>
|
||||||
|
<message name="GetList"/>
|
||||||
|
<message name="GetListResponse"><part name="result" type="tns:TUserArray"/></message>
|
||||||
|
<message name="Add"><part name="AUser" type="tns:TUser"/></message>
|
||||||
|
<message name="AddResponse"/>
|
||||||
|
<message name="Update"><part name="AUser" type="tns:TUser"/></message>
|
||||||
|
<message name="UpdateResponse"/>
|
||||||
|
<message name="Find"><part name="AName" type="xsd:string"/></message>
|
||||||
|
<message name="FindResponse"><part name="result" type="tns:TUser"/></message>
|
||||||
|
<message name="Delete"><part name="AName" type="xsd:string"/></message>
|
||||||
|
<message name="DeleteResponse"><part name="result" type="xsd:boolean"/></message>
|
||||||
|
<portType name="UserService">
|
||||||
|
<document><GUID value="{F49D8FA4-9BBC-4321-9869-5BA745070ABC}"/></document>
|
||||||
|
<operation name="GetList">
|
||||||
|
<input message="tns:GetList"/>
|
||||||
|
<output message="tns:GetListResponse"/>
|
||||||
|
</operation>
|
||||||
|
<operation name="Add">
|
||||||
|
<input message="tns:Add"/>
|
||||||
|
<output message="tns:AddResponse"/>
|
||||||
|
</operation>
|
||||||
|
<operation name="Update">
|
||||||
|
<input message="tns:Update"/>
|
||||||
|
<output message="tns:UpdateResponse"/>
|
||||||
|
</operation>
|
||||||
|
<operation name="Find">
|
||||||
|
<input message="tns:Find"/>
|
||||||
|
<output message="tns:FindResponse"/>
|
||||||
|
</operation>
|
||||||
|
<operation name="Delete">
|
||||||
|
<input message="tns:Delete"/>
|
||||||
|
<output message="tns:DeleteResponse"/>
|
||||||
|
</operation>
|
||||||
|
</portType>
|
||||||
|
<binding name="UserServiceBinding" type="tns:UserService">
|
||||||
|
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="GetList">
|
||||||
|
<soap:operation soapAction="urn:UserService/UserServiceGetList"/>
|
||||||
|
<input><soap:body use="literal" namespace="urn:UserService"/></input>
|
||||||
|
<output><soap:body use="literal" namespace="urn:UserService"/></output>
|
||||||
|
</operation>
|
||||||
|
<operation name="Add">
|
||||||
|
<soap:operation soapAction="urn:UserService/UserServiceAdd"/>
|
||||||
|
<input><soap:body use="literal" namespace="urn:UserService"/></input>
|
||||||
|
<output><soap:body use="literal" namespace="urn:UserService"/></output>
|
||||||
|
</operation>
|
||||||
|
<operation name="Update">
|
||||||
|
<soap:operation soapAction="urn:UserService/UserServiceUpdate"/>
|
||||||
|
<input><soap:body use="literal" namespace="urn:UserService"/></input>
|
||||||
|
<output><soap:body use="literal" namespace="urn:UserService"/></output>
|
||||||
|
</operation>
|
||||||
|
<operation name="Find">
|
||||||
|
<soap:operation soapAction="urn:UserService/UserServiceFind"/>
|
||||||
|
<input><soap:body use="literal" namespace="urn:UserService"/></input>
|
||||||
|
<output><soap:body use="literal" namespace="urn:UserService"/></output>
|
||||||
|
</operation>
|
||||||
|
<operation name="Delete">
|
||||||
|
<soap:operation soapAction="urn:UserService/UserServiceDelete"/>
|
||||||
|
<input><soap:body use="literal" namespace="urn:UserService"/></input>
|
||||||
|
<output><soap:body use="literal" namespace="urn:UserService"/></output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<service name="UserService">
|
||||||
|
<port name="UserServicePort" binding="tns:UserServiceBinding"><soap:address location="http://127.0.0.1:8000/services/UserService"/></port>
|
||||||
|
</service>
|
||||||
|
</definitions>
|
@ -0,0 +1,9 @@
|
|||||||
|
GetWSTResourceManager().AddResource('USER_SERVICE_INTF',
|
||||||
|
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#17'user_service_intf'#1#0#0#0#11'UserS'
|
||||||
|
+'ervice'#5#0#0#0#7'GetList'#1#0#0#0#6'result'#0#0#0#10'TUserArray'#0#0#0#0#0
|
||||||
|
+#0#0#3#0#0#0#3'Add'#1#0#0#0#5'AUser'#0#0#0#5'TUser'#0#0#0#0#0#0#0#1#0#0#0#6'U'
|
||||||
|
+'pdate'#1#0#0#0#5'AUser'#0#0#0#5'TUser'#0#0#0#0#0#0#0#1#0#0#0#4'Find'#2#0#0#0
|
||||||
|
+#5'AName'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#5'TUser'#0#0
|
||||||
|
+#0#0#0#0#0#3#0#0#0#6'Delete'#2#0#0#0#5'AName'#0#0#0#6'string'#0#0#0#0#0#0#0#1
|
||||||
|
+#0#0#0#6'result'#0#0#0#7'boolean'#0#0#0#0#0#0#0#3''
|
||||||
|
);
|
@ -0,0 +1,175 @@
|
|||||||
|
{
|
||||||
|
This unit has been produced by ws_helper.
|
||||||
|
Input unit name : "user_service_intf".
|
||||||
|
This unit name : "user_service_intf_proxy".
|
||||||
|
Date : "12/07/2007 11:50:48".
|
||||||
|
}
|
||||||
|
|
||||||
|
Unit user_service_intf_proxy;
|
||||||
|
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
||||||
|
Interface
|
||||||
|
|
||||||
|
Uses SysUtils, Classes, TypInfo, base_service_intf, service_intf, user_service_intf;
|
||||||
|
|
||||||
|
Type
|
||||||
|
|
||||||
|
|
||||||
|
TUserService_Proxy=class(TBaseProxy,UserService)
|
||||||
|
Protected
|
||||||
|
class function GetServiceType() : PTypeInfo;override;
|
||||||
|
function GetList():TUserArray;
|
||||||
|
procedure Add(
|
||||||
|
const AUser : TUser_Type
|
||||||
|
);
|
||||||
|
procedure Update(
|
||||||
|
const AUser : TUser_Type
|
||||||
|
);
|
||||||
|
function Find(
|
||||||
|
const AName : string
|
||||||
|
):TUser_Type;
|
||||||
|
function Delete(
|
||||||
|
const AName : string
|
||||||
|
):boolean;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Function wst_CreateInstance_UserService(const AFormat : string = 'SOAP:'; const ATransport : string = 'HTTP:'):UserService;
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
uses wst_resources_imp, metadata_repository;
|
||||||
|
|
||||||
|
|
||||||
|
Function wst_CreateInstance_UserService(const AFormat : string; const ATransport : string):UserService;
|
||||||
|
Begin
|
||||||
|
Result := TUserService_Proxy.Create('UserService',AFormat+GetServiceDefaultFormatProperties(TypeInfo(UserService)),ATransport + 'address=' + GetServiceDefaultAddress(TypeInfo(UserService)));
|
||||||
|
End;
|
||||||
|
|
||||||
|
{ TUserService_Proxy implementation }
|
||||||
|
|
||||||
|
class function TUserService_Proxy.GetServiceType() : PTypeInfo;
|
||||||
|
begin
|
||||||
|
result := TypeInfo(UserService);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TUserService_Proxy.GetList():TUserArray;
|
||||||
|
Var
|
||||||
|
locSerializer : IFormatterClient;
|
||||||
|
strPrmName : string;
|
||||||
|
Begin
|
||||||
|
locSerializer := GetSerializer();
|
||||||
|
Try
|
||||||
|
locSerializer.BeginCall('GetList', GetTarget(),(Self as ICallContext));
|
||||||
|
locSerializer.EndCall();
|
||||||
|
|
||||||
|
MakeCall();
|
||||||
|
|
||||||
|
locSerializer.BeginCallRead((Self as ICallContext));
|
||||||
|
TObject(Result) := Nil;
|
||||||
|
strPrmName := 'result';
|
||||||
|
locSerializer.Get(TypeInfo(TUserArray), strPrmName, Result);
|
||||||
|
|
||||||
|
Finally
|
||||||
|
locSerializer.Clear();
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
procedure TUserService_Proxy.Add(
|
||||||
|
const AUser : TUser_Type
|
||||||
|
);
|
||||||
|
Var
|
||||||
|
locSerializer : IFormatterClient;
|
||||||
|
strPrmName : string;
|
||||||
|
Begin
|
||||||
|
locSerializer := GetSerializer();
|
||||||
|
Try
|
||||||
|
locSerializer.BeginCall('Add', GetTarget(),(Self as ICallContext));
|
||||||
|
locSerializer.Put('AUser', TypeInfo(TUser_Type), AUser);
|
||||||
|
locSerializer.EndCall();
|
||||||
|
|
||||||
|
MakeCall();
|
||||||
|
|
||||||
|
locSerializer.BeginCallRead((Self as ICallContext));
|
||||||
|
|
||||||
|
Finally
|
||||||
|
locSerializer.Clear();
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
procedure TUserService_Proxy.Update(
|
||||||
|
const AUser : TUser_Type
|
||||||
|
);
|
||||||
|
Var
|
||||||
|
locSerializer : IFormatterClient;
|
||||||
|
strPrmName : string;
|
||||||
|
Begin
|
||||||
|
locSerializer := GetSerializer();
|
||||||
|
Try
|
||||||
|
locSerializer.BeginCall('Update', GetTarget(),(Self as ICallContext));
|
||||||
|
locSerializer.Put('AUser', TypeInfo(TUser_Type), AUser);
|
||||||
|
locSerializer.EndCall();
|
||||||
|
|
||||||
|
MakeCall();
|
||||||
|
|
||||||
|
locSerializer.BeginCallRead((Self as ICallContext));
|
||||||
|
|
||||||
|
Finally
|
||||||
|
locSerializer.Clear();
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
function TUserService_Proxy.Find(
|
||||||
|
const AName : string
|
||||||
|
):TUser_Type;
|
||||||
|
Var
|
||||||
|
locSerializer : IFormatterClient;
|
||||||
|
strPrmName : string;
|
||||||
|
Begin
|
||||||
|
locSerializer := GetSerializer();
|
||||||
|
Try
|
||||||
|
locSerializer.BeginCall('Find', GetTarget(),(Self as ICallContext));
|
||||||
|
locSerializer.Put('AName', TypeInfo(string), AName);
|
||||||
|
locSerializer.EndCall();
|
||||||
|
|
||||||
|
MakeCall();
|
||||||
|
|
||||||
|
locSerializer.BeginCallRead((Self as ICallContext));
|
||||||
|
TObject(Result) := Nil;
|
||||||
|
strPrmName := 'result';
|
||||||
|
locSerializer.Get(TypeInfo(TUser_Type), strPrmName, Result);
|
||||||
|
|
||||||
|
Finally
|
||||||
|
locSerializer.Clear();
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
function TUserService_Proxy.Delete(
|
||||||
|
const AName : string
|
||||||
|
):boolean;
|
||||||
|
Var
|
||||||
|
locSerializer : IFormatterClient;
|
||||||
|
strPrmName : string;
|
||||||
|
Begin
|
||||||
|
locSerializer := GetSerializer();
|
||||||
|
Try
|
||||||
|
locSerializer.BeginCall('Delete', GetTarget(),(Self as ICallContext));
|
||||||
|
locSerializer.Put('AName', TypeInfo(string), AName);
|
||||||
|
locSerializer.EndCall();
|
||||||
|
|
||||||
|
MakeCall();
|
||||||
|
|
||||||
|
locSerializer.BeginCallRead((Self as ICallContext));
|
||||||
|
strPrmName := 'result';
|
||||||
|
locSerializer.Get(TypeInfo(boolean), strPrmName, Result);
|
||||||
|
|
||||||
|
Finally
|
||||||
|
locSerializer.Clear();
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
|
||||||
|
initialization
|
||||||
|
{$i user_service_intf.wst}
|
||||||
|
|
||||||
|
{$IF DECLARED(Register_user_service_intf_ServiceMetadata)}
|
||||||
|
Register_user_service_intf_ServiceMetadata();
|
||||||
|
{$IFEND}
|
||||||
|
End.
|
@ -2,7 +2,7 @@
|
|||||||
This unit has been produced by ws_helper.
|
This unit has been produced by ws_helper.
|
||||||
Input unit name : "user_service_intf".
|
Input unit name : "user_service_intf".
|
||||||
This unit name : "user_service_intf".
|
This unit name : "user_service_intf".
|
||||||
Date : "12/07/2007 10:55:02".
|
Date : "13/07/2007 21:34:10".
|
||||||
}
|
}
|
||||||
unit user_service_intf;
|
unit user_service_intf;
|
||||||
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
||||||
@ -130,6 +130,13 @@ begin
|
|||||||
'FORMAT_Style',
|
'FORMAT_Style',
|
||||||
'rpc'
|
'rpc'
|
||||||
);
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'GetList',
|
||||||
|
'_E_N_',
|
||||||
|
'GetList'
|
||||||
|
);
|
||||||
mm.SetOperationCustomData(
|
mm.SetOperationCustomData(
|
||||||
sUNIT_NAME,
|
sUNIT_NAME,
|
||||||
'UserService',
|
'UserService',
|
||||||
@ -151,6 +158,13 @@ begin
|
|||||||
'FORMAT_OutputEncodingStyle',
|
'FORMAT_OutputEncodingStyle',
|
||||||
'literal'
|
'literal'
|
||||||
);
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Add',
|
||||||
|
'_E_N_',
|
||||||
|
'Add'
|
||||||
|
);
|
||||||
mm.SetOperationCustomData(
|
mm.SetOperationCustomData(
|
||||||
sUNIT_NAME,
|
sUNIT_NAME,
|
||||||
'UserService',
|
'UserService',
|
||||||
@ -172,6 +186,13 @@ begin
|
|||||||
'FORMAT_OutputEncodingStyle',
|
'FORMAT_OutputEncodingStyle',
|
||||||
'literal'
|
'literal'
|
||||||
);
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Update',
|
||||||
|
'_E_N_',
|
||||||
|
'Update'
|
||||||
|
);
|
||||||
mm.SetOperationCustomData(
|
mm.SetOperationCustomData(
|
||||||
sUNIT_NAME,
|
sUNIT_NAME,
|
||||||
'UserService',
|
'UserService',
|
||||||
@ -193,6 +214,13 @@ begin
|
|||||||
'FORMAT_OutputEncodingStyle',
|
'FORMAT_OutputEncodingStyle',
|
||||||
'literal'
|
'literal'
|
||||||
);
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Find',
|
||||||
|
'_E_N_',
|
||||||
|
'Find'
|
||||||
|
);
|
||||||
mm.SetOperationCustomData(
|
mm.SetOperationCustomData(
|
||||||
sUNIT_NAME,
|
sUNIT_NAME,
|
||||||
'UserService',
|
'UserService',
|
||||||
@ -214,6 +242,13 @@ begin
|
|||||||
'FORMAT_OutputEncodingStyle',
|
'FORMAT_OutputEncodingStyle',
|
||||||
'literal'
|
'literal'
|
||||||
);
|
);
|
||||||
|
mm.SetOperationCustomData(
|
||||||
|
sUNIT_NAME,
|
||||||
|
'UserService',
|
||||||
|
'Delete',
|
||||||
|
'_E_N_',
|
||||||
|
'Delete'
|
||||||
|
);
|
||||||
mm.SetOperationCustomData(
|
mm.SetOperationCustomData(
|
||||||
sUNIT_NAME,
|
sUNIT_NAME,
|
||||||
'UserService',
|
'UserService',
|
||||||
@ -240,7 +275,6 @@ end;
|
|||||||
|
|
||||||
initialization
|
initialization
|
||||||
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUserCategory_Type),'TUserCategory');
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUserCategory_Type),'TUserCategory');
|
||||||
GetTypeRegistry().ItemByTypeInfo[TypeInfo(TUserCategory_Type)].RegisterExternalPropertyName('Normal','result');
|
|
||||||
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUser_Type),'TUser');
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUser_Type),'TUser');
|
||||||
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TNote_Type),'TNote');
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TNote_Type),'TNote');
|
||||||
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUserArray),'TUserArray');
|
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TUserArray),'TUserArray');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
This unit has been produced by ws_helper.
|
This unit has been produced by ws_helper.
|
||||||
Input unit name : "user_service_intf".
|
Input unit name : "user_service_intf".
|
||||||
This unit name : "user_service_intf_binder".
|
This unit name : "user_service_intf_binder".
|
||||||
Date : "26/06/2007 23:46:28".
|
Date : "13/07/2007 21:34:10".
|
||||||
}
|
}
|
||||||
unit user_service_intf_binder;
|
unit user_service_intf_binder;
|
||||||
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
This unit has been produced by ws_helper.
|
This unit has been produced by ws_helper.
|
||||||
Input unit name : "user_service_intf".
|
Input unit name : "user_service_intf".
|
||||||
This unit name : "user_service_intf_proxy".
|
This unit name : "user_service_intf_proxy".
|
||||||
Date : "26/06/2007 23:46:28".
|
Date : "13/07/2007 21:34:10".
|
||||||
}
|
}
|
||||||
|
|
||||||
Unit user_service_intf_proxy;
|
Unit user_service_intf_proxy;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
{$INCLUDE wst_global.inc}
|
{$INCLUDE wst_global.inc}
|
||||||
unit synapse_http_protocol;
|
unit synapse_http_protocol;
|
||||||
|
|
||||||
{$DEFINE WST_DBG}
|
//{$DEFINE WST_DBG}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<IconPath Value="./"/>
|
<IconPath Value="./"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
<TargetFileExt Value=".exe"/>
|
||||||
<ActiveEditorIndexAtStart Value="0"/>
|
<ActiveEditorIndexAtStart Value="7"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<ProjectVersion Value=""/>
|
||||||
@ -36,17 +36,17 @@
|
|||||||
<Filename Value="test_prj.pas"/>
|
<Filename Value="test_prj.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="test_prj"/>
|
<UnitName Value="test_prj"/>
|
||||||
<CursorPos X="1" Y="69"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="52"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="26"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="SDMTabularService.pas"/>
|
<Filename Value="SDMTabularService.pas"/>
|
||||||
<UnitName Value="SDMTabularService"/>
|
<UnitName Value="SDMTabularService"/>
|
||||||
<CursorPos X="3" Y="154"/>
|
<CursorPos X="3" Y="154"/>
|
||||||
<TopLine Value="145"/>
|
<TopLine Value="143"/>
|
||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="10"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\..\binary_streamer.pas"/>
|
<Filename Value="..\..\binary_streamer.pas"/>
|
||||||
<UnitName Value="binary_streamer"/>
|
<UnitName Value="binary_streamer"/>
|
||||||
<CursorPos X="95" Y="107"/>
|
<CursorPos X="21" Y="13"/>
|
||||||
<TopLine Value="6"/>
|
<TopLine Value="6"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
<Filename Value="..\..\wst_global.inc"/>
|
<Filename Value="..\..\wst_global.inc"/>
|
||||||
<CursorPos X="11" Y="4"/>
|
<CursorPos X="5" Y="4"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
@ -104,8 +104,8 @@
|
|||||||
<Unit8>
|
<Unit8>
|
||||||
<Filename Value="..\..\soap_formatter.pas"/>
|
<Filename Value="..\..\soap_formatter.pas"/>
|
||||||
<UnitName Value="soap_formatter"/>
|
<UnitName Value="soap_formatter"/>
|
||||||
<CursorPos X="1" Y="94"/>
|
<CursorPos X="19" Y="13"/>
|
||||||
<TopLine Value="6"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -113,8 +113,8 @@
|
|||||||
<Unit9>
|
<Unit9>
|
||||||
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||||
<UnitName Value="synapse_http_protocol"/>
|
<UnitName Value="synapse_http_protocol"/>
|
||||||
<CursorPos X="30" Y="176"/>
|
<CursorPos X="18" Y="13"/>
|
||||||
<TopLine Value="142"/>
|
<TopLine Value="13"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -172,7 +172,24 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit16>
|
</Unit16>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
<JumpHistory Count="4" HistoryIndex="3">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||||
|
<Caret Line="176" Column="30" TopLine="142"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||||
|
<Caret Line="26" Column="4" TopLine="11"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||||
|
<Caret Line="13" Column="18" TopLine="13"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="test_prj.pas"/>
|
||||||
|
<Caret Line="8" Column="13" TopLine="1"/>
|
||||||
|
</Position4>
|
||||||
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
|
@ -25,8 +25,8 @@ object fAbout: TfAbout
|
|||||||
Left = 93
|
Left = 93
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 113
|
Width = 108
|
||||||
Caption = 'Type Librarry Editor'
|
Caption = 'Type Library Editor'
|
||||||
Font.Style = [fsBold, fsItalic]
|
Font.Style = [fsBold, fsItalic]
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
@ -9,7 +9,7 @@ LazarusResources.Add('TfAbout','FORMDATA',[
|
|||||||
+'Left'#2','#6'Height'#2#14#3'Top'#2#24#5'Width'#3#211#0#7'Caption'#6'$Web Se'
|
+'Left'#2','#6'Height'#2#14#3'Top'#2#24#5'Width'#3#211#0#7'Caption'#6'$Web Se'
|
||||||
+'rvices Toolkit for FPC/Lazarus'#10'Font.Style'#11#6'fsBold'#0#11'ParentColo'
|
+'rvices Toolkit for FPC/Lazarus'#10'Font.Style'#11#6'fsBold'#0#11'ParentColo'
|
||||||
+'r'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2']'#6'Height'#2#14#3'Top'#2'8'#5'Widt'
|
+'r'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2']'#6'Height'#2#14#3'Top'#2'8'#5'Widt'
|
||||||
+'h'#2'q'#7'Caption'#6#20'Type Librarry Editor'#10'Font.Style'#11#6'fsBold'#8
|
+'h'#2'l'#7'Caption'#6#19'Type Library Editor'#10'Font.Style'#11#6'fsBold'#8
|
||||||
+'fsItalic'#0#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2'1'#6'Height'
|
+'fsItalic'#0#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2'1'#6'Height'
|
||||||
+#2#14#3'Top'#2'p'#5'Width'#3#200#0#7'Caption'#6'$Copyright (c) 2007 Inoussa '
|
+#2#14#3'Top'#2'p'#5'Width'#3#200#0#7'Caption'#6'$Copyright (c) 2007 Inoussa '
|
||||||
+'OUEDRAOGO'#11'ParentColor'#8#0#0#7'TButton'#7'Button1'#4'Left'#2'p'#6'Heigh'
|
+'OUEDRAOGO'#11'ParentColor'#8#0#0#7'TButton'#7'Button1'#4'Left'#2'p'#6'Heigh'
|
||||||
|
@ -691,7 +691,7 @@ begin
|
|||||||
s := Format('Register_%s_NameSpace',[SymbolTable.CurrentModule.Name]);
|
s := Format('Register_%s_NameSpace',[SymbolTable.CurrentModule.Name]);
|
||||||
WriteLn(' {$IF DECLARED(%s)}',[s]);
|
WriteLn(' {$IF DECLARED(%s)}',[s]);
|
||||||
WriteLn(' %s();',[s]);
|
WriteLn(' %s();',[s]);
|
||||||
WriteLn(' {$ENDIF}');
|
WriteLn(' {$IFEND}');
|
||||||
NewLine();
|
NewLine();
|
||||||
WriteLn(' {$i %s.%s}',[SymbolTable.CurrentModule.Name,sWST_EXTENSION]);
|
WriteLn(' {$i %s.%s}',[SymbolTable.CurrentModule.Name,sWST_EXTENSION]);
|
||||||
NewLine();
|
NewLine();
|
||||||
@ -977,7 +977,7 @@ Var
|
|||||||
for k := 0 to Pred(mtds.Count) do begin
|
for k := 0 to Pred(mtds.Count) do begin
|
||||||
if TPasElement(mtds[k]).InheritsFrom(TPasProcedure) then begin
|
if TPasElement(mtds[k]).InheritsFrom(TPasProcedure) then begin
|
||||||
mtd := TPasProcedure(mtds[k]);
|
mtd := TPasProcedure(mtds[k]);
|
||||||
WriteLn('RegisterVerbHandler(%s,@%sHandler);',[QuotedStr(mtd.Name),mtd.Name]);
|
WriteLn('RegisterVerbHandler(%s,{$IFDEF FPC}@{$ENDIF}%sHandler);',[QuotedStr(mtd.Name),mtd.Name]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
EndAutoIndent();
|
EndAutoIndent();
|
||||||
|
@ -77,15 +77,15 @@ procedure TMetadataGenerator.GenerateIntfMetadata(AIntf: TPasClassType);
|
|||||||
|
|
||||||
procedure WriteParam(APrm : TPasArgument);
|
procedure WriteParam(APrm : TPasArgument);
|
||||||
begin
|
begin
|
||||||
FStream.WriteStr(FSymbolTable.GetExternalName(APrm));
|
FStream.WriteStr(APrm.Name);
|
||||||
FStream.WriteStr(FSymbolTable.GetExternalName(APrm.ArgType));
|
FStream.WriteStr(APrm.ArgType.Name);
|
||||||
FStream.WriteEnum(Ord(APrm.Access));
|
FStream.WriteEnum(Ord(APrm.Access));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure WriteResult(ARes : TPasResultElement);
|
procedure WriteResult(ARes : TPasResultElement);
|
||||||
begin
|
begin
|
||||||
FStream.WriteStr(FSymbolTable.GetExternalName(ARes));
|
FStream.WriteStr(ARes.Name);
|
||||||
FStream.WriteStr(FSymbolTable.GetExternalName(ARes.ResultType));
|
FStream.WriteStr(ARes.ResultType.Name);
|
||||||
FStream.WriteEnum(Ord(argOut));
|
FStream.WriteEnum(Ord(argOut));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
<Filename Value="generator.pas"/>
|
<Filename Value="generator.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="generator"/>
|
<UnitName Value="generator"/>
|
||||||
<CursorPos X="30" Y="47"/>
|
<CursorPos X="21" Y="694"/>
|
||||||
<TopLine Value="35"/>
|
<TopLine Value="113"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
<Bookmarks Count="3">
|
<Bookmarks Count="3">
|
||||||
@ -131,8 +131,8 @@
|
|||||||
<Filename Value="metadata_generator.pas"/>
|
<Filename Value="metadata_generator.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="metadata_generator"/>
|
<UnitName Value="metadata_generator"/>
|
||||||
<CursorPos X="2" Y="19"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="5"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -500,11 +500,31 @@
|
|||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
</Unit62>
|
</Unit62>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="1" HistoryIndex="0">
|
<JumpHistory Count="6" HistoryIndex="5">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="metadata_generator.pas"/>
|
<Filename Value="metadata_generator.pas"/>
|
||||||
<Caret Line="122" Column="37" TopLine="114"/>
|
<Caret Line="117" Column="33" TopLine="96"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="metadata_generator.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="metadata_generator.pas"/>
|
||||||
|
<Caret Line="81" Column="41" TopLine="67"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="metadata_generator.pas"/>
|
||||||
|
<Caret Line="88" Column="44" TopLine="74"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="metadata_generator.pas"/>
|
||||||
|
<Caret Line="99" Column="32" TopLine="85"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="metadata_generator.pas"/>
|
||||||
|
<Caret Line="117" Column="30" TopLine="104"/>
|
||||||
|
</Position6>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -6,4 +6,5 @@
|
|||||||
PByteArray = ^ByteArray;
|
PByteArray = ^ByteArray;
|
||||||
ByteArray = array[0..$effffff] of Byte;
|
ByteArray = array[0..$effffff] of Byte;
|
||||||
PtrUInt = Cardinal;
|
PtrUInt = Cardinal;
|
||||||
|
SizeInt = Longint;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
20
wst/trunk/wst_delphi_rtti_utils.pas
Normal file
20
wst/trunk/wst_delphi_rtti_utils.pas
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
unit wst_delphi_rtti_utils;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses SysUtils, TypInfo;
|
||||||
|
|
||||||
|
|
||||||
|
function GetEnumNameCount(AEnumTypeInfo: PTypeInfo): Integer;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
function GetEnumNameCount(AEnumTypeInfo: PTypeInfo): Integer;
|
||||||
|
var
|
||||||
|
T: PTypeData;
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
T := GetTypeData(AEnumTypeInfo);
|
||||||
|
Result := ( T^.MaxValue - T^.MinValue ) + 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
@ -11,12 +11,14 @@ type
|
|||||||
|
|
||||||
TDOMNode = IDOMNode;
|
TDOMNode = IDOMNode;
|
||||||
TDOMNodeList = IDOMNodeList;
|
TDOMNodeList = IDOMNodeList;
|
||||||
|
TDOMNamedNodeMap = IDOMNamedNodeMap;
|
||||||
TXMLDocument = IDOMDocument;
|
TXMLDocument = IDOMDocument;
|
||||||
TDOMElement = IDOMElement;
|
TDOMElement = IDOMElement;
|
||||||
|
|
||||||
function FindNode(ANode : TDOMNode; const ANodeName : string):TDOMNode;
|
function FindNode(ANode : TDOMNode; const ANodeName : string):TDOMNode;
|
||||||
function GetNodeItemsCount(const ANode : TDOMNode): Integer;
|
function GetNodeItemsCount(const ANode : TDOMNode): Integer;
|
||||||
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;
|
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;overload;
|
||||||
|
function GetNodeListCount(ANodeList : TDOMNamedNodeMap) : Integer ;overload;
|
||||||
procedure ReleaseDomNode(ADomNode : IInterface);overload;
|
procedure ReleaseDomNode(ADomNode : IInterface);overload;
|
||||||
procedure ReleaseDomNode(var ADomNode : TXMLDocument);overload;
|
procedure ReleaseDomNode(var ADomNode : TXMLDocument);overload;
|
||||||
|
|
||||||
@ -65,7 +67,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;
|
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;overload;
|
||||||
|
begin
|
||||||
|
Result := ANodeList.length;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetNodeListCount(ANodeList : TDOMNamedNodeMap) : Integer ;overload;
|
||||||
begin
|
begin
|
||||||
Result := ANodeList.length;
|
Result := ANodeList.length;
|
||||||
end;
|
end;
|
||||||
|
@ -10,7 +10,8 @@ uses
|
|||||||
{$INCLUDE wst_delphi.inc}
|
{$INCLUDE wst_delphi.inc}
|
||||||
|
|
||||||
function GetNodeItemsCount(const ANode : TDOMNode): Integer;
|
function GetNodeItemsCount(const ANode : TDOMNode): Integer;
|
||||||
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
|
function GetNodeListCount(ANodeList : TDOMNamedNodeMap) : Integer ;overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
procedure ReleaseDomNode(ADomNode : TDOMNode);overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
procedure ReleaseDomNode(ADomNode : TDOMNode);overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
procedure ReleaseDomNode(ADomNode : TDOMNodeList);overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
procedure ReleaseDomNode(ADomNode : TDOMNodeList);overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
function CreateDoc() : TXMLDocument ;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
function CreateDoc() : TXMLDocument ;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
@ -37,11 +38,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
function GetNodeListCount(ANodeList : TDOMNodeList) : Integer ;overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := ANodeList.Count;
|
Result := ANodeList.Count;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetNodeListCount(ANodeList : TDOMNamedNodeMap) : Integer ;overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
|
begin
|
||||||
|
Result := ANodeList.Length;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure ReleaseDomNode(ADomNode : TDOMNode);overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
procedure ReleaseDomNode(ADomNode : TDOMNode);overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
begin
|
begin
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
{$DEFINE HAS_QWORD}
|
{$DEFINE HAS_QWORD}
|
||||||
{$DEFINE USE_INLINE}
|
//{$DEFINE USE_INLINE}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$UNDEF HAS_QWORD}
|
{$UNDEF HAS_QWORD}
|
||||||
{$UNDEF USE_INLINE}
|
{$UNDEF USE_INLINE}
|
||||||
|
Reference in New Issue
Block a user