Object Pascal "record" serialization ( first commit! )

TTest_TIntfPoolItem
TTest_TSimpleItemFactory
TTest_XmlRpcFormatterExceptionBlock
TTest_SoapFormatterExceptionBlock
Record serialization test

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@243 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2007-08-19 00:29:43 +00:00
parent bbee29cb90
commit 11a897fc26
60 changed files with 4375 additions and 893 deletions

View File

@ -18,7 +18,6 @@ uses
Classes, SysUtils, Contnrs, TypInfo,
base_service_intf, binary_streamer;
{$INCLUDE wst.inc}
{$DEFINE wst_binary_header}
const
@ -220,6 +219,11 @@ type
Const ATypeInfo : PTypeInfo;
Const AData : TObject
);
procedure PutRecord(
const AName : string;
const ATypeInfo : PTypeInfo;
const AData : Pointer
);
function GetDataBuffer(var AName : String):PDataBuffer;
procedure GetEnum(
@ -257,6 +261,11 @@ type
Var AName : String;
Var AData : TObject
);
procedure GetRecord(
const ATypeInfo : PTypeInfo;
var AName : String;
var AData : Pointer
);
public
constructor Create();override;
destructor Destroy();override;
@ -909,6 +918,15 @@ begin
TBaseRemotableClass(GetTypeData(ATypeInfo)^.ClassType).Save(AData As TBaseRemotable, Self,AName,ATypeInfo);
end;
procedure TBaseBinaryFormatter.PutRecord(
const AName : string;
const ATypeInfo : PTypeInfo;
const AData : Pointer
);
begin
TRemotableRecordEncoder.Save(AData,Self,AName,ATypeInfo);
end;
function TBaseBinaryFormatter.GetDataBuffer(var AName: String): PDataBuffer;
begin
Result := StackTop().Find(AName);
@ -1001,6 +1019,15 @@ begin
TBaseRemotableClass(GetTypeData(ATypeInfo)^.ClassType).Load(AData, Self,AName,ATypeInfo);
end;
procedure TBaseBinaryFormatter.GetRecord(
const ATypeInfo : PTypeInfo;
var AName : String;
var AData : Pointer
);
begin
TRemotableRecordEncoder.Load(AData, Self,AName,ATypeInfo);
end;
procedure TBaseBinaryFormatter.Clear();
begin
ClearStack();
@ -1141,6 +1168,10 @@ begin
objData := TObject(AData);
PutObj(AName,ATypeInfo,objData);
End;
tkRecord :
begin
PutRecord(AName,ATypeInfo,Pointer(@AData));
end;
{$IFDEF FPC}
tkBool :
Begin
@ -1340,6 +1371,7 @@ Var
boolData : Boolean;
enumData : TEnumData;
floatDt : TFloat_Extended_10;
recObject : Pointer;
begin
Case ATypeInfo^.Kind Of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
@ -1360,6 +1392,11 @@ begin
GetObj(ATypeInfo,AName,objData);
TObject(AData) := objData;
End;
tkRecord :
begin
recObject := Pointer(@AData);
GetRecord(ATypeInfo,AName,recObject);
end;
{$IFDEF FPC}
tkBool :
Begin
@ -1405,7 +1442,7 @@ begin
ftDouble : Double(AData) := floatDt;
ftExtended : Extended(AData) := floatDt;
ftCurr : Currency(AData) := floatDt;
{$IFDEF CPU86}
{$IFDEF HAS_COMP}
ftComp : Comp(AData) := floatDt;
{$ENDIF}
End;
@ -1476,7 +1513,7 @@ begin
ftDouble : Double(AData) := dataBuffer^.DoubleData;
ftExtended : Extended(AData) := dataBuffer^.ExtendedData;
ftCurr : Currency(AData) := dataBuffer^.CurrencyData;
{$IFDEF CPU86}
{$IFDEF HAS_COMP}
else
Comp(AData) := dataBuffer^.ExtendedData;
{$ENDIF}

View File

@ -11,20 +11,19 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
{$INCLUDE wst_global.inc}
{$RANGECHECKS OFF}
unit base_service_intf;
interface
uses
Classes, SysUtils, TypInfo, Contnrs, syncobjs, semaphore
Classes, SysUtils, TypInfo, Contnrs, syncobjs, semaphore, wst_types
{$IFNDEF FPC}
,Windows
{$ENDIF}
;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
const
stBase = 0;
stObject = stBase + 1;
@ -67,8 +66,11 @@ type
property FaultString : string Read FFaultString Write FFaultString;
End;
ETypeRegistryException = class(EServiceException)
End;
EServiceConfigException = class(EServiceException)
end;
ETypeRegistryException = class(EServiceConfigException)
end;
IItemFactory = Interface;
IFormatterBase = Interface;
@ -358,6 +360,26 @@ type
);override;
end;
TRemotableRecordEncoderClass = class of TRemotableRecordEncoder;
{ TRemotableRecordEncoder }
TRemotableRecordEncoder = class(TPersistent)
public
class procedure Save(
ARecord : Pointer;
AStore : IFormatterBase;
const AName : string;
const ATypeInfo : PTypeInfo
);virtual;
class procedure Load(
var ARecord : Pointer;
AStore : IFormatterBase;
var AName : string;
const ATypeInfo : PTypeInfo
);virtual;
end;
{ TBaseComplexSimpleContentRemotable }
TBaseComplexSimpleContentRemotable = class(TAbstractComplexRemotable)
@ -1115,6 +1137,8 @@ type
FSynonymTable : TStrings;
FExternalNames : TStrings;
FInternalNames : TStrings;
private
procedure CreateInternalObjects();
public
constructor Create(
ANameSpace : string;
@ -1129,6 +1153,9 @@ type
function GetExternalPropertyName(const APropName : string) : string;
function GetInternalPropertyName(const AExtPropName : string) : string;
procedure RegisterObject(const APropName : string; const AObject : TObject);
function GetObject(const APropName : string) : TObject;
property DataType : PTypeInfo read FDataType;
property NameSpace : string read FNameSpace;
property DeclaredName : string read FDeclaredName;
@ -1193,6 +1220,7 @@ const
sWST_BASE_NS = 'urn:wst_base';
PROP_LIST_DELIMITER = ';';
FIELDS_STRING = '__FIELDS__';
function GetTypeRegistry():TTypeRegistry;
procedure RegisterStdTypes();
@ -1210,9 +1238,12 @@ var
{$ENDIF}
implementation
uses imp_utils;
uses imp_utils, record_rtti;
Var
type
PObject = ^TObject;
var
TypeRegistryInstance : TTypeRegistry = Nil;
function GetTypeRegistry():TTypeRegistry;
@ -1582,7 +1613,7 @@ begin
AStore.SetSerializationStyle(ss);
prpName := typRegItem.GetExternalPropertyName(p^.Name);
case pt^.Kind of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
tkInt64{$IFDEF HAS_QWORD},tkQWord{$ENDIF} :
begin
int64Data := GetInt64Prop(AObject,p^.Name);
AStore.Put(prpName,pt,int64Data);
@ -1675,7 +1706,7 @@ begin
floatDt.CurrencyData := GetFloatProp(AObject,p^.Name);
AStore.Put(prpName,pt,floatDt.CurrencyData);
end;
{$IFDEF CPU86}
{$IFDEF HAS_COMP}
ftComp :
begin
floatDt.CompData := GetFloatProp(AObject,p^.Name);
@ -1752,7 +1783,7 @@ begin
AStore.SetSerializationStyle(ss);
try
Case pt^.Kind Of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
tkInt64{$IFDEF HAS_QWORD},tkQWord{$ENDIF} :
begin
AStore.Get(pt,propName,int64Data);
SetInt64Prop(AObject,p^.Name,int64Data);
@ -2113,7 +2144,8 @@ end;
constructor TSimpleItemFactory.Create(AItemClass: TSimpleFactoryItemClass);
begin
Assert(Assigned(AItemClass));
if not Assigned(AItemClass) then
raise EServiceConfigException.CreateFmt('Invalid parameter : %s; Procedure = %s',['AItemClass','TSimpleItemFactory.Create()']);
FItemClass := AItemClass;
end;
@ -2331,6 +2363,14 @@ end;
{ TTypeRegistryItem }
procedure TTypeRegistryItem.CreateInternalObjects();
begin
if not Assigned(FExternalNames) then begin
FExternalNames := TStringList.Create();
FInternalNames := TStringList.Create();
end;
end;
constructor TTypeRegistryItem.Create(
ANameSpace : String;
ADataType : PTypeInfo;
@ -2375,13 +2415,39 @@ end;
procedure TTypeRegistryItem.RegisterExternalPropertyName(const APropName,AExtPropName: string);
begin
if not Assigned(FExternalNames) then begin
FExternalNames := TStringList.Create();
FInternalNames := TStringList.Create();
CreateInternalObjects();
end;
FExternalNames.Values[APropName] := AExtPropName;
FInternalNames.Values[AExtPropName] := APropName;
end;
procedure TTypeRegistryItem.RegisterObject(const APropName : string; const AObject : TObject);
var
i : PtrInt;
begin
if not Assigned(FExternalNames) then begin
CreateInternalObjects();
end;
i := FExternalNames.IndexOfName(APropName);
if ( i < 0 ) then begin
FExternalNames.Values[APropName] := APropName;
i := FExternalNames.IndexOfName(APropName);
end;
FExternalNames.Objects[i] := AObject;
end;
function TTypeRegistryItem.GetObject(const APropName : string) : TObject;
var
i : PtrInt;
begin
Result := nil;
if Assigned(FExternalNames) then begin
i := FExternalNames.IndexOfName(APropName);
if ( i >= 0 ) then
Result := FExternalNames.Objects[i];
end;
end;
function TTypeRegistryItem.GetExternalPropertyName(const APropName: string): string;
begin
if Assigned(FExternalNames) and ( FExternalNames.IndexOfName(APropName) <> -1 ) then begin
@ -3503,7 +3569,7 @@ begin
Assigned(p^.SetProc)
then begin
case p^.PropType^.Kind of
tkInt64{$IFDEF FPC},tkQWord, tkBool{$ENDIF}, tkEnumeration,tkInteger :
tkInt64{$IFDEF HAS_QWORD} ,tkQWord{$ENDIF} {$IFDEF FPC} ,tkBool{$ENDIF}, tkEnumeration,tkInteger :
SetOrdProp(Self,p,GetOrdProp(Source,p^.Name));
tkLString{$IFDEF FPC}, tkAString{$ENDIF} :
SetStrProp(Self,p,GetStrProp(Source,p^.Name));
@ -3581,7 +3647,7 @@ begin
propName := tr.ItemByTypeInfo[pt].GetExternalPropertyName(p^.Name);
if IsStoredProp(AObject,p) then begin
case pt^.Kind of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
tkInt64{$IFDEF HAS_QWORD},tkQWord{$ENDIF} :
begin
int64Data := GetOrdProp(AObject,p^.Name);
AStore.Put(propName,pt,int64Data);
@ -3674,7 +3740,7 @@ begin
floatDt.CurrencyData := GetFloatProp(AObject,p^.Name);
AStore.Put(propName,pt,floatDt.CurrencyData);
end;
{$IFDEF CPU86}
{$IFDEF HAS_COMP}
ftComp :
begin
floatDt.CompData := GetFloatProp(AObject,p^.Name);
@ -3744,7 +3810,7 @@ begin
propName := tr.ItemByTypeInfo[pt].GetExternalPropertyName(p^.Name);
try
Case pt^.Kind Of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
tkInt64{$IFDEF HAS_QWORD},tkQWord{$ENDIF} :
Begin
AStore.Get(pt,propName,int64Data);
SetOrdProp(AObject,p^.Name,int64Data);
@ -4512,6 +4578,219 @@ begin
end;
end;
{ TRemotableRecordEncoder }
class procedure TRemotableRecordEncoder.Save(
ARecord : Pointer;
AStore : IFormatterBase;
const AName : string;
const ATypeInfo : PTypeInfo
);
var
recStart, recFieldAddress : PByte;
typData : PRecordTypeData;
i : PtrInt;
pt : PTypeInfo;
p : PRecordFieldInfo;
oldSS,ss : TSerializationStyle;
typRegItem : TTypeRegistryItem;
prpName : string;
typDataObj : TObject;
begin
oldSS := AStore.GetSerializationStyle();
AStore.BeginObject(AName,ATypeInfo);
try
if not Assigned(ARecord) then begin
AStore.NilCurrentScope();
Exit;
end;
typRegItem := GetTypeRegistry().ItemByTypeInfo[ATypeInfo];
typDataObj := typRegItem.GetObject(FIELDS_STRING);
Assert(Assigned(typDataObj),Format('Incomplete type registration for the type of this parameter : %s',[AName]));
typData := PRecordTypeData((typDataObj as TDataObject).Data);
Assert(Assigned(typData));
if ( typData^.FieldCount > 0 ) then begin
recStart := PByte(ARecord);
ss := AStore.GetSerializationStyle();
for i := 0 to Pred(typData^.FieldCount) do begin
p := @(typData^.Fields[i]);
pt := p^.TypeInfo^;//{$IFNDEF FPC}^{$ENDIF};
{if IsAttributeProperty(p^.Name) then begin
if ( ss <> ssAttibuteSerialization ) then
ss := ssAttibuteSerialization;
end else begin
if ( ss <> ssNodeSerialization ) then
ss := ssNodeSerialization;
end;
if ( ss <> AStore.GetSerializationStyle() ) then
AStore.SetSerializationStyle(ss);}
AStore.SetSerializationStyle(ssNodeSerialization);
prpName := typRegItem.GetExternalPropertyName(p^.Name);
recFieldAddress := recStart;
Inc(recFieldAddress,p^.Offset);
case pt^.Kind of
tkInt64 : AStore.Put(prpName,pt,PInt64(recFieldAddress)^);
{$IFDEF HAS_QWORD}
tkQWord : AStore.Put(prpName,pt,PQWord(recFieldAddress)^);
{$ENDIF}
tkLString{$IFDEF FPC},tkAString{$ENDIF} : AStore.Put(prpName,pt,PString(recFieldAddress)^);
tkClass : AStore.Put(prpName,pt,PObject(recFieldAddress)^);
tkRecord : AStore.Put(prpName,pt,Pointer(recFieldAddress)^);
{$IFDEF FPC}
tkBool : AStore.Put(prpName,pt,PBoolean(recFieldAddress)^);
{$ENDIF}
tkEnumeration,tkInteger :
begin
{$IFNDEF FPC}
if ( pt^.Kind = tkEnumeration ) and
( GetTypeData(pt)^.BaseType^ = TypeInfo(Boolean) )
then begin
AStore.Put(prpName,pt,PBoolean(recFieldAddress)^);
end else begin
{$ENDIF}
case GetTypeData(pt)^.OrdType of
otSByte : AStore.Put(prpName,pt,PShortInt(recFieldAddress)^);
otUByte : AStore.Put(prpName,pt,PByte(recFieldAddress)^);
otSWord : AStore.Put(prpName,pt,PSmallInt(recFieldAddress)^);
otUWord : AStore.Put(prpName,pt,PWord(recFieldAddress)^);
otSLong : AStore.Put(prpName,pt,PLongint(recFieldAddress)^);
otULong : AStore.Put(prpName,pt,PLongWord(recFieldAddress)^);
end;
{$IFNDEF FPC}
end;
{$ENDIF}
end;
tkFloat :
begin
case GetTypeData(pt)^.FloatType of
ftSingle : AStore.Put(prpName,pt,PSingle(recFieldAddress)^);
ftDouble : AStore.Put(prpName,pt,PDouble(recFieldAddress)^);
ftExtended : AStore.Put(prpName,pt,PExtended(recFieldAddress)^);
ftCurr : AStore.Put(prpName,pt,PCurrency(recFieldAddress)^);
{$IFDEF HAS_COMP}
ftComp : AStore.Put(prpName,pt,PComp(recFieldAddress)^);
{$ENDIF}
end;
end;
end;
end;
end;
finally
AStore.EndScope();
AStore.SetSerializationStyle(oldSS);
end;
end;
class procedure TRemotableRecordEncoder.Load(
var ARecord : Pointer;
AStore : IFormatterBase;
var AName : string;
const ATypeInfo : PTypeInfo
);
var
recStart, recFieldAddress : PByte;
typData : PRecordTypeData;
i : PtrInt;
pt : PTypeInfo;
propName : String;
p : PRecordFieldInfo;
persistType : TPropStoreType;
oldSS,ss : TSerializationStyle;
typRegItem : TTypeRegistryItem;
typDataObj : TObject;
begin
oldSS := AStore.GetSerializationStyle();
if ( AStore.BeginObjectRead(AName,ATypeInfo) >= 0 ) then begin
try
if AStore.IsCurrentScopeNil() then
Exit;
typRegItem := GetTypeRegistry().ItemByTypeInfo[ATypeInfo];
typDataObj := typRegItem.GetObject(FIELDS_STRING);
Assert(Assigned(typDataObj),Format('Incomplete type registration for the type of this parameter : %s',[AName]));
typData := PRecordTypeData((typDataObj as TDataObject).Data);
Assert(Assigned(typData));
if ( not Assigned(ARecord) ) then begin
GetMem(ARecord,typData^.RecordSize);
FillChar(ARecord^,typData^.RecordSize,#0);
end;
if ( typData^.FieldCount > 0 ) then begin
recStart := PByte(ARecord);
for i := 0 to Pred(typData^.FieldCount) do begin
p := @(typData^.Fields[i]);
persistType := pstOptional;// IsStoredPropClass(objTypeData^.ClassType,p);
pt := p^.TypeInfo^;//{$IFNDEF FPC}^{$ENDIF};
propName := typRegItem.GetExternalPropertyName(p^.Name);
{if IsAttributeProperty(p^.Name) then begin
ss := ssAttibuteSerialization;
end else begin
ss := ssNodeSerialization;
end;
if ( ss <> AStore.GetSerializationStyle() ) then
AStore.SetSerializationStyle(ss);}
AStore.SetSerializationStyle(ssNodeSerialization);
recFieldAddress := recStart;
Inc(recFieldAddress,p^.Offset);
try
Case pt^.Kind Of
tkInt64 : AStore.Get(pt,propName,PInt64(recFieldAddress)^);
{$IFDEF HAS_QWORD}
tkQWord : AStore.Get(pt,propName,PQWord(recFieldAddress)^);
{$ENDIF}
tkLString{$IFDEF FPC}, tkAString{$ENDIF} : AStore.Get(pt,propName,PString(recFieldAddress)^);
{$IFDEF FPC}
tkBool : AStore.Get(pt,propName,PBoolean(recFieldAddress)^);
{$ENDIF}
tkClass : AStore.Get(pt,propName,PObject(recFieldAddress)^);
tkRecord : AStore.Get(pt,propName,Pointer(recFieldAddress)^);
tkEnumeration,tkInteger :
Begin
{$IFNDEF FPC}
if ( pt^.Kind = tkEnumeration ) and
( GetTypeData(pt)^.BaseType^ = TypeInfo(Boolean) )
then begin
AStore.Get(pt,propName,PBoolean(recFieldAddress)^);
end else begin
{$ENDIF}
case GetTypeData(pt)^.OrdType Of
otSByte : AStore.Get(pt,propName,PShortInt(recFieldAddress)^);
otUByte : AStore.Get(pt,propName,PByte(recFieldAddress)^);
otSWord : AStore.Get(pt,propName,PSmallInt(recFieldAddress)^);
otUWord : AStore.Get(pt,propName,PWord(recFieldAddress)^);
otSLong : AStore.Get(pt,propName,PLongint(recFieldAddress)^);
otULong : AStore.Get(pt,propName,PLongWord(recFieldAddress)^);
end;
{$IFNDEF FPC}
end;
{$ENDIF}
End;
tkFloat :
begin
case GetTypeData(pt)^.FloatType of
ftSingle : AStore.Get(pt,propName,PSingle(recFieldAddress)^);
ftDouble : AStore.Get(pt,propName,PDouble(recFieldAddress)^);
ftExtended : AStore.Get(pt,propName,PExtended(recFieldAddress)^);
ftCurr : AStore.Get(pt,propName,PCurrency(recFieldAddress)^);
{$IFDEF HAS_COMP}
ftComp : AStore.Get(pt,propName,PComp(recFieldAddress)^);
{$ENDIF}
end;
end;
End;
except
on E : EServiceException do begin
if ( persistType = pstAlways ) then
raise;
end;
end;
end;
end;
finally
AStore.EndScopeRead();
AStore.SetSerializationStyle(oldSS);
end;
end;
end;
initialization
{$IFDEF FPC}

View File

@ -20,9 +20,6 @@ uses
{$IFNDEF FPC}xmldom, wst_delphi_xml{$ELSE}DOM{$ENDIF},
base_service_intf;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
const
sPROTOCOL_NAME = 'SOAP';
@ -183,6 +180,11 @@ type
Const ATypeInfo : PTypeInfo;
Const AData : TObject
);
procedure PutRecord(
const AName : string;
const ATypeInfo : PTypeInfo;
const AData : Pointer
);
function GetNodeValue(var AName : String):DOMString;
procedure GetEnum(
@ -222,6 +224,11 @@ type
Var AName : String;
Var AData : TObject
);
procedure GetRecord(
const ATypeInfo : PTypeInfo;
var AName : String;
var AData : Pointer
);
protected
function GetXmlDoc():TwstXMLDocument;
function PushStack(AScopeObject : TDOMNode):TStackItem;overload;
@ -313,18 +320,18 @@ type
procedure EndHeader();
procedure Put(
Const AName : String;
Const ATypeInfo : PTypeInfo;
Const AData
const AName : string;
const ATypeInfo : PTypeInfo;
const AData
);
procedure PutScopeInnerValue(
const ATypeInfo : PTypeInfo;
const AData
);
procedure Get(
Const ATypeInfo : PTypeInfo;
Var AName : String;
Var AData
const ATypeInfo : PTypeInfo;
var AName : string;
var AData
);
procedure GetScopeInnerValue(
const ATypeInfo : PTypeInfo;
@ -515,6 +522,7 @@ procedure TSOAPBaseFormatter.InternalClear(const ACreateDoc: Boolean);
begin
ClearStack();
ReleaseDomNode(FDoc);
FDoc := nil;
if ACreateDoc then
FDoc := CreateDoc();
end;
@ -738,6 +746,15 @@ begin
TBaseRemotableClass(GetTypeData(ATypeInfo)^.ClassType).Save(AData As TBaseRemotable, Self,AName,ATypeInfo);
end;
procedure TSOAPBaseFormatter.PutRecord(
const AName : string;
const ATypeInfo : PTypeInfo;
const AData : Pointer
);
begin
TRemotableRecordEncoder.Save(AData,Self,AName,ATypeInfo);
end;
function TSOAPBaseFormatter.PutFloat(
const AName : String;
const ATypeInfo : PTypeInfo;
@ -888,6 +905,15 @@ begin
TBaseRemotableClass(GetTypeData(ATypeInfo)^.ClassType).Load(AData, Self,AName,ATypeInfo);
end;
procedure TSOAPBaseFormatter.GetRecord(
const ATypeInfo : PTypeInfo;
var AName : String;
var AData : Pointer
);
begin
TRemotableRecordEncoder.Load(AData, Self,AName,ATypeInfo);
end;
function TSOAPBaseFormatter.GetXmlDoc(): TwstXMLDocument;
begin
Result := FDoc;
@ -1375,6 +1401,10 @@ begin
objData := TObject(AData);
PutObj(AName,ATypeInfo,objData);
End;
tkRecord :
begin
PutRecord(AName,ATypeInfo,Pointer(@AData));
end;
{$IFDEF FPC}
tkBool :
Begin
@ -1548,6 +1578,7 @@ Var
boolData : Boolean;
enumData : TEnumIntType;
floatDt : Extended;
recObject : Pointer;
begin
Case ATypeInfo^.Kind Of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
@ -1568,6 +1599,11 @@ begin
GetObj(ATypeInfo,AName,objData);
TObject(AData) := objData;
End;
tkRecord :
begin
recObject := Pointer(@AData);
GetRecord(ATypeInfo,AName,recObject);
end;
{$IFDEF FPC}
tkBool :
Begin

View File

@ -20,9 +20,6 @@ uses
{$IFNDEF FPC}xmldom, wst_delphi_xml{$ELSE}DOM{$ENDIF},
base_service_intf;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
const
sPROTOCOL_NAME = 'XMLRPC';
@ -195,6 +192,11 @@ type
Const ATypeInfo : PTypeInfo;
Const AData : TObject
);
procedure PutRecord(
const AName : string;
const ATypeInfo : PTypeInfo;
const AData : Pointer
);
function GetNodeValue(var AName : String):DOMString;
procedure GetEnum(
@ -234,6 +236,11 @@ type
Var AName : String;
Var AData : TObject
);
procedure GetRecord(
const ATypeInfo : PTypeInfo;
var AName : String;
var AData : Pointer
);
protected
function GetXmlDoc():TXMLDocument;
function PushStack(AScopeObject : TDOMNode):TStackItem;overload;
@ -573,6 +580,7 @@ procedure TXmlRpcBaseFormatter.InternalClear(const ACreateDoc: Boolean);
begin
ClearStack();
ReleaseDomNode(FDoc);
FDoc := nil;
if ACreateDoc then
FDoc := CreateDoc();
end;
@ -732,6 +740,15 @@ begin
TBaseRemotableClass(GetTypeData(ATypeInfo)^.ClassType).Save(AData As TBaseRemotable, Self,AName,ATypeInfo);
end;
procedure TXmlRpcBaseFormatter.PutRecord(
const AName : string;
const ATypeInfo : PTypeInfo;
const AData : Pointer
);
begin
TRemotableRecordEncoder.Save(AData,Self,AName,ATypeInfo);
end;
function TXmlRpcBaseFormatter.PutFloat(
const AName : String;
const ATypeInfo : PTypeInfo;
@ -864,6 +881,15 @@ begin
TBaseRemotableClass(GetTypeData(ATypeInfo)^.ClassType).Load(AData, Self,AName,ATypeInfo);
end;
procedure TXmlRpcBaseFormatter.GetRecord(
const ATypeInfo : PTypeInfo;
var AName : String;
var AData : Pointer
);
begin
TRemotableRecordEncoder.Load(AData, Self,AName,ATypeInfo);
end;
function TXmlRpcBaseFormatter.GetXmlDoc(): TwstXMLDocument;
begin
Result := FDoc;
@ -1056,6 +1082,10 @@ begin
objData := TObject(AData);
PutObj(AName,ATypeInfo,objData);
End;
tkRecord :
begin
PutRecord(AName,ATypeInfo,Pointer(@AData));
end;
{$IFDEF FPC}
tkBool :
Begin
@ -1218,6 +1248,7 @@ Var
{$IFDEF FPC}boolData : Boolean;{$ENDIF}
enumData : TEnumIntType;
floatDt : Extended;
recObject : Pointer;
begin
Case ATypeInfo^.Kind Of
tkInt64{$IFDEF FPC},tkQWord{$ENDIF} :
@ -1238,6 +1269,11 @@ begin
GetObj(ATypeInfo,AName,objData);
TObject(AData) := objData;
End;
tkRecord :
begin
recObject := Pointer(@AData);
GetRecord(ATypeInfo,AName,recObject);
end;
{$IFDEF FPC}
tkBool :
Begin
@ -1271,7 +1307,7 @@ begin
ftDouble : Double(AData) := floatDt;
ftExtended : Extended(AData) := floatDt;
ftCurr : Currency(AData) := floatDt;
{$IFDEF CPU86}
{$IFDEF HAS_COMP}
ftComp : Comp(AData) := floatDt;
{$ENDIF}
End;
@ -1347,7 +1383,7 @@ begin
ftDouble : Double(AData) := floatDt;
ftExtended : Extended(AData) := floatDt;
ftCurr : Currency(AData) := floatDt;
{$IFDEF CPU86}
{$IFDEF HAS_COMP}
ftComp : Comp(AData) := floatDt;
{$ENDIF}
end;

View File

@ -20,9 +20,6 @@ uses
base_service_intf, service_intf, imp_utils,
base_binary_formatter;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
Const
sCONTENT_TYPE = 'contenttype';
sBINARY_CONTENT = 'binary';

View File

@ -22,9 +22,6 @@ uses
service_intf, imp_utils, base_service_intf,
HttpProt;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
Const
sTRANSPORT_NAME = 'HTTP';

View File

@ -20,8 +20,6 @@ uses
service_intf, imp_utils, base_service_intf,
WSocket;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
Const
sTRANSPORT_NAME = 'TCP';

View File

@ -19,9 +19,6 @@ uses
Classes, SysUtils, TypInfo,
base_service_intf;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
Type
EPropertyManagerException = class(EServiceException)
@ -46,15 +43,35 @@ Type
End;
function IsStrEmpty(Const AStr:String):Boolean;
function GetToken(var ABuffer : string; const ADelimiter : string): string;
function ExtractOptionName(const ACompleteName : string):string;
implementation
uses wst_types;
function IsStrEmpty(Const AStr:String):Boolean;
begin
Result := ( Length(Trim(AStr)) = 0 );
end;
function GetToken(var ABuffer : string; const ADelimiter : string): string;
var
locPos, locOfs, locLen : PtrInt;
locStr : string;
begin
locPos := Pos(ADelimiter, ABuffer);
locLen := Length(ADelimiter);
locOfs := locLen - 1;
if (IsStrEmpty(ABuffer)) or ((locPos = 0) and (Length(ABuffer) > 0)) then begin
Result := ABuffer;
ABuffer := '';
end else begin
locStr := Copy(ABuffer, 1, locPos + locOfs);
ABuffer := Copy(ABuffer, locPos + locLen, Length(ABuffer));
Result := Copy(locStr, 1, Length(locStr) - locLen);
end;
end;
function ExtractOptionName(const ACompleteName : string):string;
var
i, c : Integer;

View File

@ -209,9 +209,9 @@ procedure TwstIndyHttpListener.Handler_CommandGet(
var
{$IFDEF WST_DBG}
s : string;
j : SizeInt;
{$ENDIF}
locPath, locPathPart : string;
j : SizeInt;
begin
{$IFDEF WST_DBG}
if Assigned(ARequestInfo.PostStream) and ( ARequestInfo.PostStream.Size > 0 ) then begin

View File

@ -22,9 +22,6 @@ uses
service_intf, imp_utils, base_service_intf, library_base_intf,
library_imp_utils;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
const
sTRANSPORT_NAME = 'LIB';

View File

@ -18,9 +18,6 @@ interface
uses
Classes, SysUtils, TypInfo;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
const
sWST_SIGNATURE = 'WST_METADATA_0.2.2.0';
sWST_META = 'wst_meta';

View File

@ -20,9 +20,6 @@ uses
{$IFNDEF FPC}xmldom, wst_delphi_xml{$ELSE}DOM{$ENDIF},
base_service_intf, metadata_repository;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
type
IWsdlTypeHandler = interface
@ -83,10 +80,11 @@ type
implementation
uses
wst_types
{$IFNDEF FPC}
wst_delphi_rtti_utils
, wst_delphi_rtti_utils
{$ELSE}
wst_fpc_xml, XmlWrite
, wst_fpc_xml, XmlWrite
{$ENDIF};
const

323
wst/trunk/record_rtti.pas Normal file
View File

@ -0,0 +1,323 @@
{
This file is part of the Web Service Toolkit
Copyright (c) 2006 by Inoussa OUEDRAOGO
This file is provide under modified LGPL licence
( the files COPYING.modifiedLGPL and COPYING.LGPL).
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
{$INCLUDE wst_global.inc}
unit record_rtti;
{$RANGECHECKS OFF}
interface
uses
SysUtils, TypInfo, wst_types;
type
PRecordFieldInfo = ^TRecordFieldInfo;
TRecordFieldInfo = packed record
Name : shortstring;
TypeInfo : PPTypeInfo;
Offset : PtrUInt;
end;
PRecordTypeData = ^TRecordTypeData;
TRecordTypeData = packed record
Name : shortstring;
RecordSize : PtrUInt;
FieldCount: PtrUInt;
Fields: array [0..0] of TRecordFieldInfo;
end;
{ TRecordRttiDataObject }
TRecordRttiDataObject = class(TDataObject)
public
constructor Create(const AData : PRecordTypeData; const AFieldList : string);
destructor Destroy();override;
function GetRecordTypeData() : PRecordTypeData;
end;
function MakeRecordTypeInfo(ARawTypeInfo : PTypeInfo) : PRecordTypeData;
procedure FreeRecordTypeInfo(ATypeInfo : PRecordTypeData);
{$IFDEF WST_RECORD_RTTI}
function MakeRawTypeInfo(
const ATypeName : string;
const ATypeSize : PtrUInt;
const AOffset : array of PtrUInt;
const ATypes : array of PTypeInfo
):PTypeInfo ;
{$ENDIF WST_RECORD_RTTI}
implementation
uses Classes, imp_utils;
{$IFDEF WST_RECORD_RTTI}
var
RawTypeInfoList : TList = nil;
type
PFieldInfo = ^TFieldInfo;
TFieldInfo = packed record
TypeInfo: PPTypeInfo;
Offset: Cardinal;
end;
PFieldTable = ^TFieldTable;
TFieldTable = packed record
X: Word;
Size: Cardinal;
Count: Cardinal;
Fields: array [0..0] of TFieldInfo;
end;
function MakeRawTypeInfo(
const ATypeName : string;
const ATypeSize : PtrUInt;
const AOffset : array of PtrUInt;
const ATypes : array of PTypeInfo
):PTypeInfo ;
var
i, j, bufferSize, count : LongInt;
delphiFT : PFieldTable;
resBuffer, tmp : PByte;
fieldInfo : PFieldInfo;
typ : PTypeInfo;
begin
count := Length(AOffset);
Assert(count = Length(ATypes));
bufferSize :=
1 + // Kind
1 + Length(ATypeName) +
SizeOf(Word) + // X
SizeOf(Cardinal) + // Size
SizeOf(Cardinal) + // Count
( count * SizeOf(TFieldInfo) );
GetMem(resBuffer,bufferSize);
FillChar(Pointer(resBuffer)^,bufferSize,#0);
tmp := resBuffer;
typ := PTypeInfo(resBuffer);
typ^.Kind := tkRecord;
PByte(@(typ^.Name[0]))^ := Length(ATypeName);
Move(ATypeName[1],typ^.Name[1],Length(ATypeName));
Inc(tmp,SizeOf(TTypeKind)); // Kind
Inc(tmp,1 + Byte(typ^.Name[0])); // Name
delphiFT := PFieldTable(tmp);
delphiFT^.X := 0;
delphiFT^.Size := ATypeSize;
delphiFT^.Count := count;
for i := 1 to count do begin
j := i - 1;
fieldInfo := @(delphiFT^.Fields[j]);
fieldInfo^.Offset := AOffset[j];
GetMem(fieldInfo^.TypeInfo,SizeOf(Pointer));
fieldInfo^.TypeInfo^ := ATypes[j];
end;
Result := typ;
RawTypeInfoList.Add(Result);
end;
procedure FreeRawTypeInfo(ARawTypeInfo : PTypeInfo);
var
i : PtrInt;
delphiFT : PFieldTable;
tmp : PByte;
fieldInfo : PFieldInfo;
begin
if Assigned(ARawTypeInfo) then begin
tmp := PByte(ARawTypeInfo);
Inc(tmp,SizeOf(TTypeKind)); // Kind
Inc(tmp,1 + Byte(ARawTypeInfo^.Name[0])); // Name
delphiFT := PFieldTable(tmp);
for i := 1 to delphiFT^.Count do begin
fieldInfo := @(delphiFT^.Fields[(i - 1)]);
FreeMem(fieldInfo^.TypeInfo);
fieldInfo^.TypeInfo := nil;
end;
FreeMem(ARawTypeInfo);
end;
end;
function MakeRecordTypeInfo(ARawTypeInfo : PTypeInfo) : PRecordTypeData;
var
i, bufferSize, count : LongInt;
delphiFT : PFieldTable;
resBuffer : PRecordTypeData;
fieldInfo : PRecordFieldInfo;
fld : PFieldInfo;
tmp : PByte;
begin
tmp := PByte(ARawTypeInfo);
Inc(tmp);
Inc(tmp,1 + Byte(ARawTypeInfo.Name[0]));
delphiFT := PFieldTable(tmp);
count := delphiFT^.Count;
{calc buffer size}
bufferSize :=
SizeOf(shortstring) + // Name : shortstring;
SizeOf(PtrUInt) + // Size : PtrUInt;
SizeOf(PtrUInt) + // FieldCount: PtrUInt;
( count * SizeOf(TRecordFieldInfo) ); // Fields: array [0..0] of TRecordFieldInfo;
GetMem(resBuffer,bufferSize);
FillChar(Pointer(resBuffer)^,bufferSize,#0);
resBuffer^.Name := PTypeInfo(ARawTypeInfo).Name;
resBuffer^.RecordSize := delphiFT^.Size;
resBuffer^.FieldCount := count;
{ Process elements }
for i := 1 to Count do begin
fld := @(delphiFT^.Fields[(i - 1)]);
fieldInfo := @(resBuffer^.Fields[(i - 1)]);
fieldInfo^.TypeInfo := fld^.TypeInfo;
fieldInfo^.Offset := fld^.Offset;
end;
Result := resBuffer;
end;
{$ENDIF WST_RECORD_RTTI}
{$IFDEF FPC}
function aligntoptr(p : pointer) : pointer;inline;
begin
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
result:=align(p,sizeof(p));
{$else FPC_REQUIRES_PROPER_ALIGNMENT}
result:=p;
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
end;
function MakeRecordTypeInfo(ARawTypeInfo : PTypeInfo) : PRecordTypeData;
{
A record is designed as follows :
1 : tkrecord
2 : Length of name string (n);
3 : name string;
3+n : record size;
7+n : number of elements (N)
11+n : N times : Pointer to type info
Offset in record
}
var
Temp : pbyte;
namelen : byte;
count,
offset,
i : longint;
info : pointer;
resBuffer : PRecordTypeData;
typName : shortstring;
typSize : Cardinal;
bufferSize : PtrUInt;
fieldInfo : PRecordFieldInfo;
begin
Temp := PByte(ARawTypeInfo);
Inc(Temp);
{ Skip Name }
namelen := Temp^;
SetLength(typName,namelen);
Inc(temp,1);
Move(Temp^,typName[1],namelen);
Inc(temp,namelen);
temp:=aligntoptr(temp);
{ Skip size }
typSize := PLongint(Temp)^;
Inc(Temp,4);
{ Element count }
Count := PLongint(Temp)^;
Inc(Temp,sizeof(Count));
{calc buffer size}
bufferSize :=
SizeOf(shortstring) + // Name : shortstring;
SizeOf(PtrUInt) + // Size : PtrUInt;
SizeOf(PtrUInt) + // FieldCount: PtrUInt;
( Count * SizeOf(TRecordFieldInfo) ); // Fields: array [0..0] of TRecordFieldInfo;
GetMem(resBuffer,bufferSize);
FillChar(Pointer(resBuffer)^,bufferSize,#0);
resBuffer^.Name := typName;
resBuffer^.RecordSize := typSize;
resBuffer^.FieldCount := count;
{ Process elements }
for i := 1 to Count do begin
fieldInfo := @(resBuffer^.Fields[(i - 1)]);
Info := PPointer(Temp)^;
fieldInfo^.TypeInfo := PPTypeInfo(Temp);
Inc(Temp,sizeof(Info));
Offset := PLongint(Temp)^;
fieldInfo^.Offset := Offset;
Inc(Temp,sizeof(Offset));
end;
Result := resBuffer;
end;
{$ENDIF FPC}
procedure FreeRecordTypeInfo(ATypeInfo : PRecordTypeData);
begin
if ( ATypeInfo <> nil ) then
FreeMem(ATypeInfo);
end;
{ TRecordRttiDataObject }
constructor TRecordRttiDataObject.Create(
const AData : PRecordTypeData;
const AFieldList : string
);
var
locData : PRecordTypeData;
i : PtrInt;
ls, s : string;
begin
locData := AData;
inherited Create(locData);
ls := Trim(AFieldList);
s := '';
i := 0;
while ( i < locData^.FieldCount ) do begin
s := GetToken(ls,';');
if IsStrEmpty(s) then
Break;
locData^.Fields[i].Name := s;
Inc(i);
end;
end;
destructor TRecordRttiDataObject.Destroy();
begin
FreeRecordTypeInfo(Data);
inherited Destroy();
end;
function TRecordRttiDataObject.GetRecordTypeData() : PRecordTypeData;
begin
Result := PRecordTypeData(Data);
end;
initialization
{$IFDEF WST_RECORD_RTTI}
RawTypeInfoList := TList.Create();
{$ENDIF WST_RECORD_RTTI}
finalization
{$IFDEF WST_RECORD_RTTI}
while ( RawTypeInfoList.Count > 0 ) do begin
FreeRawTypeInfo(PTypeInfo(RawTypeInfoList.Items[0]));
RawTypeInfoList.Delete(0);
end;
FreeAndNil(RawTypeInfoList);
{$ENDIF WST_RECORD_RTTI}
end.

View File

@ -20,9 +20,6 @@ uses
service_intf, imp_utils,
server_service_intf, server_service_imputils, base_service_intf;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
Const
sTRANSPORT_NAME = 'SAME_PROCESS';

View File

@ -12,7 +12,7 @@
<MainUnit Value="0"/>
<IconPath Value=".\"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="5"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -35,17 +35,17 @@
<Filename Value="amazon_sample.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="amazon_sample"/>
<CursorPos X="40" Y="12"/>
<CursorPos X="24" Y="12"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="24"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="..\..\synapse_http_protocol.pas"/>
<UnitName Value="synapse_http_protocol"/>
<CursorPos X="1" Y="16"/>
<TopLine Value="2"/>
<CursorPos X="1" Y="13"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
@ -94,7 +94,12 @@
<Loaded Value="True"/>
</Unit6>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
<JumpHistory Count="1" HistoryIndex="0">
<Position1>
<Filename Value="amazon_sample.pas"/>
<Caret Line="14" Column="1" TopLine="11"/>
</Position1>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<Flags>
@ -10,7 +10,7 @@
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<IconPath Value=".\"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="1"/>
</General>
@ -19,6 +19,7 @@
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
@ -26,7 +27,7 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
@ -53,7 +54,7 @@
<UsageCount Value="30"/>
</Unit1>
<Unit2>
<Filename Value="../../base_service_intf.pas"/>
<Filename Value="..\..\base_service_intf.pas"/>
<UnitName Value="base_service_intf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
@ -62,7 +63,7 @@
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="../../metadata_wsdl.pas"/>
<Filename Value="..\..\metadata_wsdl.pas"/>
<UnitName Value="metadata_wsdl"/>
<CursorPos X="80" Y="80"/>
<TopLine Value="66"/>
@ -71,14 +72,14 @@
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="../../metadata_service_imp.pas"/>
<Filename Value="..\..\metadata_service_imp.pas"/>
<UnitName Value="metadata_service_imp"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="31"/>
</Unit4>
<Unit5>
<Filename Value="../user_service_intf_imp.pas"/>
<Filename Value="..\user_service_intf_imp.pas"/>
<UnitName Value="user_service_intf_imp"/>
<CursorPos X="60" Y="51"/>
<TopLine Value="32"/>
@ -87,7 +88,7 @@
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="../user_service_intf_binder.pas"/>
<Filename Value="..\user_service_intf_binder.pas"/>
<UnitName Value="user_service_intf_binder"/>
<CursorPos X="37" Y="247"/>
<TopLine Value="224"/>
@ -96,7 +97,7 @@
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="../user_service_intf.pas"/>
<Filename Value="..\user_service_intf.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="user_service_intf"/>
<CursorPos X="7" Y="3"/>
@ -106,7 +107,7 @@
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="../../metadata_repository.pas"/>
<Filename Value="..\..\metadata_repository.pas"/>
<UnitName Value="metadata_repository"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="7"/>
@ -115,14 +116,14 @@
<Loaded Value="True"/>
</Unit8>
<Unit9>
<Filename Value="../../semaphore.pas"/>
<Filename Value="..\..\semaphore.pas"/>
<UnitName Value="semaphore"/>
<CursorPos X="1" Y="140"/>
<TopLine Value="113"/>
<UsageCount Value="25"/>
</Unit9>
<Unit10>
<Filename Value="../../server_service_intf.pas"/>
<Filename Value="..\..\server_service_intf.pas"/>
<UnitName Value="server_service_intf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
@ -131,234 +132,234 @@
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="../../server_service_soap.pas"/>
<Filename Value="..\..\server_service_soap.pas"/>
<UnitName Value="server_service_soap"/>
<CursorPos X="17" Y="22"/>
<TopLine Value="1"/>
<UsageCount Value="39"/>
</Unit11>
<Unit12>
<Filename Value="../../base_soap_formatter.pas"/>
<Filename Value="..\..\base_soap_formatter.pas"/>
<UnitName Value="base_soap_formatter"/>
<CursorPos X="36" Y="1576"/>
<TopLine Value="1586"/>
<UsageCount Value="40"/>
</Unit12>
<Unit13>
<Filename Value="../../server_service_imputils.pas"/>
<Filename Value="..\..\server_service_imputils.pas"/>
<UnitName Value="server_service_imputils"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="34"/>
</Unit13>
<Unit14>
<Filename Value="../../../../../../lazarus_23_215/others_package/indy/indy-10.2.0.1/fpc/Protocols/IdCustomHTTPServer.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215\others_package\indy\indy-10.2.0.1\fpc\Protocols\IdCustomHTTPServer.pas"/>
<UnitName Value="IdCustomHTTPServer"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="1"/>
</Unit14>
<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"/>
<TopLine Value="1231"/>
<UsageCount Value="1"/>
</Unit15>
<Unit16>
<Filename Value="../../wst.inc"/>
<Filename Value="..\..\wst.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit16>
<Unit17>
<Filename Value="../../xmlrpc_formatter.pas"/>
<Filename Value="..\..\xmlrpc_formatter.pas"/>
<UnitName Value="xmlrpc_formatter"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="28"/>
<UsageCount Value="1"/>
</Unit17>
<Unit18>
<Filename Value="../../server_service_xmlrpc.pas"/>
<Filename Value="..\..\server_service_xmlrpc.pas"/>
<UnitName Value="server_service_xmlrpc"/>
<CursorPos X="21" Y="22"/>
<TopLine Value="7"/>
<UsageCount Value="37"/>
</Unit18>
<Unit19>
<Filename Value="../../server_binary_formatter.pas"/>
<Filename Value="..\..\server_binary_formatter.pas"/>
<UnitName Value="server_binary_formatter"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="35"/>
</Unit19>
<Unit20>
<Filename Value="../../base_xmlrpc_formatter.pas"/>
<Filename Value="..\..\base_xmlrpc_formatter.pas"/>
<UnitName Value="base_xmlrpc_formatter"/>
<CursorPos X="3" Y="985"/>
<TopLine Value="974"/>
<UsageCount Value="35"/>
</Unit20>
<Unit21>
<Filename Value="../../../../../../lazarus23_213/others_package/indy/indy-10.2.0.1/fpc/Core/IdSocketHandle.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus23_213\others_package\indy\indy-10.2.0.1\fpc\Core\IdSocketHandle.pas"/>
<UnitName Value="IdSocketHandle"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="1"/>
</Unit21>
<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"/>
<CursorPos X="19" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="2"/>
</Unit22>
<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"/>
<CursorPos X="14" Y="510"/>
<TopLine Value="497"/>
<UsageCount Value="13"/>
</Unit23>
<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="21" Y="208"/>
<TopLine Value="193"/>
<UsageCount Value="44"/>
</Unit24>
<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"/>
<TopLine Value="42"/>
<UsageCount Value="2"/>
</Unit25>
<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"/>
<TopLine Value="821"/>
<UsageCount Value="3"/>
</Unit26>
<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"/>
<TopLine Value="285"/>
<UsageCount Value="36"/>
</Unit27>
<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"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
</Unit28>
<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"/>
<TopLine Value="1"/>
<UsageCount Value="2"/>
</Unit29>
<Unit30>
<Filename Value="../../wst_fpc_xml.pas"/>
<Filename Value="..\..\wst_fpc_xml.pas"/>
<UnitName Value="wst_fpc_xml"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="35"/>
</Unit30>
<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"/>
<TopLine Value="52"/>
<UsageCount Value="35"/>
</Unit31>
<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"/>
<TopLine Value="30"/>
<UsageCount Value="2"/>
</Unit32>
<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"/>
<TopLine Value="51"/>
<UsageCount Value="2"/>
</Unit33>
<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="25" Y="216"/>
<TopLine Value="203"/>
<UsageCount Value="7"/>
</Unit34>
<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"/>
<TopLine Value="1"/>
<UsageCount Value="2"/>
</Unit35>
<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="59" Y="101"/>
<TopLine Value="101"/>
<UsageCount Value="51"/>
</Unit36>
<Unit37>
<Filename Value="../../metadata_service.pas"/>
<Filename Value="..\..\metadata_service.pas"/>
<UnitName Value="metadata_service"/>
<CursorPos X="26" Y="13"/>
<TopLine Value="1"/>
<UsageCount Value="31"/>
</Unit37>
<Unit38>
<Filename Value="../../wst_rtti_filter/cursor_intf.pas"/>
<Filename Value="..\..\wst_rtti_filter\cursor_intf.pas"/>
<UnitName Value="cursor_intf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="20"/>
</Unit38>
<Unit39>
<Filename Value="../user_service_intf.wst"/>
<Filename Value="..\user_service_intf.wst"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="3"/>
<SyntaxHighlighter Value="None"/>
</Unit39>
<Unit40>
<Filename Value="../../../../../../lazarus_23_215XX/fpc/source/packages/fcl-xml/src/dom.pp"/>
<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="11"/>
</Unit40>
<Unit41>
<Filename Value="../../../../../../lazarus_23_215XX/fpc/source/rtl/objpas/typinfo.pp"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
<UnitName Value="typinfo"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="115"/>
<UsageCount Value="45"/>
</Unit41>
<Unit42>
<Filename Value="../user_service_intf_proxy.pas"/>
<Filename Value="..\user_service_intf_proxy.pas"/>
<UnitName Value="user_service_intf_proxy"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="28"/>
</Unit42>
<Unit43>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Protocols/IdCustomHTTPServer.pas"/>
<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="5"/>
</Unit43>
<Unit44>
<Filename Value="../../type_lib_edtr/uabout.pas"/>
<Filename Value="..\..\type_lib_edtr\uabout.pas"/>
<ComponentName Value="fAbout"/>
<HasResources Value="True"/>
<ResourceFilename Value="../../type_lib_edtr/uabout.lrs"/>
<ResourceFilename Value="..\..\type_lib_edtr\uabout.lrs"/>
<UnitName Value="uabout"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="5"/>
</Unit44>
<Unit45>
<Filename Value="../../type_lib_edtr/uwsttypelibraryedit.pas"/>
<Filename Value="..\..\type_lib_edtr\uwsttypelibraryedit.pas"/>
<ComponentName Value="fWstTypeLibraryEdit"/>
<HasResources Value="True"/>
<UnitName Value="uwsttypelibraryedit"/>
@ -367,17 +368,17 @@
<UsageCount Value="4"/>
</Unit45>
<Unit46>
<Filename Value="../../ide/lazarus/wstimportdlg.pas"/>
<Filename Value="..\..\ide\lazarus\wstimportdlg.pas"/>
<ComponentName Value="formImport"/>
<HasResources Value="True"/>
<ResourceFilename Value="../../ide/lazarus/wstimportdlg.lrs"/>
<ResourceFilename Value="..\..\ide\lazarus\wstimportdlg.lrs"/>
<UnitName Value="wstimportdlg"/>
<CursorPos X="27" Y="7"/>
<TopLine Value="1"/>
<UsageCount Value="5"/>
</Unit46>
<Unit47>
<Filename Value="../../indy_http_server.pas"/>
<Filename Value="..\..\indy_http_server.pas"/>
<UnitName Value="indy_http_server"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
@ -386,39 +387,39 @@
<Loaded Value="True"/>
</Unit47>
<Unit48>
<Filename Value="../../server_listener.pas"/>
<Filename Value="..\..\server_listener.pas"/>
<UnitName Value="server_listener"/>
<CursorPos X="28" Y="33"/>
<TopLine Value="26"/>
<UsageCount Value="20"/>
</Unit48>
<Unit49>
<Filename Value="../../../../../../lazarus_23_215XX/fpc/source/rtl/inc/aliases.inc"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\aliases.inc"/>
<CursorPos X="84" Y="14"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit49>
<Unit50>
<Filename Value="../../../../../../lazarus_23_215XX/fpc/source/rtl/inc/variant.inc"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\variant.inc"/>
<CursorPos X="11" Y="24"/>
<TopLine Value="29"/>
<UsageCount Value="10"/>
</Unit50>
<Unit51>
<Filename Value="../../../../../../lazarus_23_215XX/fpc/source/rtl/objpas/sysutils/osutilsh.inc"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\osutilsh.inc"/>
<CursorPos X="53" Y="37"/>
<TopLine Value="30"/>
<UsageCount Value="13"/>
</Unit51>
<Unit52>
<Filename Value="../../../../../../lazarus_23_215XX/fpc/source/rtl/win/sysutils.pp"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\win\sysutils.pp"/>
<UnitName Value="sysutils"/>
<CursorPos X="45" Y="1084"/>
<TopLine Value="1076"/>
<UsageCount Value="13"/>
</Unit52>
<Unit53>
<Filename Value="../../config_objects.pas"/>
<Filename Value="..\..\config_objects.pas"/>
<UnitName Value="config_objects"/>
<CursorPos X="74" Y="99"/>
<TopLine Value="85"/>
@ -427,13 +428,13 @@
<Loaded Value="True"/>
</Unit53>
<Unit54>
<Filename Value="../../wst_delphi.inc"/>
<Filename Value="..\..\wst_delphi.inc"/>
<CursorPos X="22" Y="5"/>
<TopLine Value="1"/>
<UsageCount Value="7"/>
</Unit54>
<Unit55>
<Filename Value="../../indy_tcp_server.pas"/>
<Filename Value="..\..\indy_tcp_server.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="indy_tcp_server"/>
<CursorPos X="1" Y="1"/>
@ -443,143 +444,131 @@
<Loaded Value="True"/>
</Unit55>
<Unit56>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdTCPServer.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdTCPServer.pas"/>
<UnitName Value="IdTCPServer"/>
<CursorPos X="38" Y="32"/>
<TopLine Value="19"/>
<UsageCount Value="10"/>
</Unit56>
<Unit57>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdCustomTCPServer.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdCustomTCPServer.pas"/>
<UnitName Value="IdCustomTCPServer"/>
<CursorPos X="74" Y="260"/>
<TopLine Value="238"/>
<UsageCount Value="14"/>
</Unit57>
<Unit58>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/System/IdSys.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\System\IdSys.pas"/>
<UnitName Value="IdSys"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="13"/>
</Unit58>
<Unit59>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdThread.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdThread.pas"/>
<UnitName Value="IdThread"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
</Unit59>
<Unit60>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdYarn.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdYarn.pas"/>
<UnitName Value="IdYarn"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="21"/>
<UsageCount Value="9"/>
</Unit60>
<Unit61>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdTask.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdTask.pas"/>
<UnitName Value="IdTask"/>
<CursorPos X="6" Y="32"/>
<TopLine Value="19"/>
<UsageCount Value="13"/>
</Unit61>
<Unit62>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdIOHandler.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdIOHandler.pas"/>
<UnitName Value="IdIOHandler"/>
<CursorPos X="3" Y="906"/>
<TopLine Value="902"/>
<UsageCount Value="10"/>
</Unit62>
<Unit63>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdBuffer.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdBuffer.pas"/>
<UnitName Value="IdBuffer"/>
<CursorPos X="17" Y="432"/>
<TopLine Value="427"/>
<UsageCount Value="13"/>
</Unit63>
<Unit64>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdTCPConnection.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdTCPConnection.pas"/>
<UnitName Value="IdTCPConnection"/>
<CursorPos X="15" Y="357"/>
<TopLine Value="340"/>
<UsageCount Value="13"/>
</Unit64>
<Unit65>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdIOHandlerSocket.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdIOHandlerSocket.pas"/>
<UnitName Value="IdIOHandlerSocket"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="13"/>
</Unit65>
<Unit66>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdIOHandlerStack.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdIOHandlerStack.pas"/>
<UnitName Value="IdIOHandlerStack"/>
<CursorPos X="3" Y="400"/>
<TopLine Value="438"/>
<UsageCount Value="13"/>
</Unit66>
<Unit67>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdExceptionCore.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdExceptionCore.pas"/>
<UnitName Value="IdExceptionCore"/>
<CursorPos X="33" Y="108"/>
<TopLine Value="95"/>
<UsageCount Value="13"/>
</Unit67>
<Unit68>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/System/IdException.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\System\IdException.pas"/>
<UnitName Value="IdException"/>
<CursorPos X="3" Y="183"/>
<TopLine Value="160"/>
<UsageCount Value="9"/>
</Unit68>
<Unit69>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/System/IdObjs.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\System\IdObjs.pas"/>
<UnitName Value="IdObjs"/>
<CursorPos X="3" Y="94"/>
<TopLine Value="78"/>
<UsageCount Value="13"/>
</Unit69>
<Unit70>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/Core/IdSocketHandle.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\Core\IdSocketHandle.pas"/>
<UnitName Value="IdSocketHandle"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="13"/>
</Unit70>
<Unit71>
<Filename Value="../../../../../../lazarus_23_215XX/others_package/indy/indy-10.2.0.1/fpc/System/IdStack.pas"/>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\others_package\indy\indy-10.2.0.1\fpc\System\IdStack.pas"/>
<UnitName Value="IdStack"/>
<CursorPos X="14" Y="200"/>
<TopLine Value="176"/>
<UsageCount Value="13"/>
</Unit71>
</Units>
<JumpHistory Count="3" HistoryIndex="2">
<Position1>
<Filename Value="http_server.pas"/>
<Caret Line="12" Column="56" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="../user_service_intf_imp.pas"/>
<Caret Line="51" Column="60" TopLine="32"/>
</Position2>
<Position3>
<Filename Value="../../config_objects.pas"/>
<Caret Line="99" Column="60" TopLine="76"/>
</Position3>
</JumpHistory>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="http_server"/>
</Target>
<SearchPaths>
<IncludeFiles Value="../../;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Inc/"/>
<OtherUnitFiles Value="../;../../;../../wst_rtti_filter/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Core/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Protocols/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/System/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Inc/"/>
<IncludeFiles Value="..\..\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
<OtherUnitFiles Value="..\;..\..\;..\..\wst_rtti_filter\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Core\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Protocols\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\System\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
<UnitOutputDirectory Value="obj"/>
<SrcPath Value="$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Core/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Protocols/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/System/;$(LazarusDir)/others_package/indy/indy-10.2.0.1/fpc/Inc/"/>
<SrcPath Value="$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Core\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Protocols\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\System\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
@ -605,19 +594,19 @@
<Debugging>
<BreakPoints Count="4">
<Item1>
<Source Value="D:/lazarusClean/fpcsrc/rtl/inc/getopts.pp"/>
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="230"/>
</Item1>
<Item2>
<Source Value="D:/lazarusClean/fpcsrc/rtl/inc/getopts.pp"/>
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="193"/>
</Item2>
<Item3>
<Source Value="D:/lazarusClean/fpcsrc/rtl/inc/getopts.pp"/>
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="198"/>
</Item3>
<Item4>
<Source Value="../../ws_helper/wsdl2pas_imp.pas"/>
<Source Value="..\..\ws_helper\wsdl2pas_imp.pas"/>
<Line Value="606"/>
</Item4>
</BreakPoints>

View File

@ -1,11 +1,11 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<IconPath Value=".\"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="4"/>
</General>
@ -14,6 +14,7 @@
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
@ -21,7 +22,7 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="9">
@ -36,7 +37,7 @@
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="../../library_server_intf.pas"/>
<Filename Value="..\..\library_server_intf.pas"/>
<UnitName Value="library_server_intf"/>
<CursorPos X="32" Y="91"/>
<TopLine Value="1"/>
@ -45,25 +46,25 @@
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../user_service_intf_imp.pas"/>
<Filename Value="..\user_service_intf_imp.pas"/>
<UnitName Value="user_service_intf_imp"/>
<CursorPos X="43" Y="179"/>
<TopLine Value="157"/>
<EditorIndex Value="6"/>
<EditorIndex Value="5"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="../../wst_rtti_filter/rtti_filters.pas"/>
<Filename Value="..\..\wst_rtti_filter\rtti_filters.pas"/>
<UnitName Value="rtti_filters"/>
<CursorPos X="53" Y="43"/>
<TopLine Value="184"/>
<EditorIndex Value="8"/>
<EditorIndex Value="7"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="../user_service_intf_binder.pas"/>
<Filename Value="..\user_service_intf_binder.pas"/>
<UnitName Value="user_service_intf_binder"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="64"/>
@ -72,25 +73,25 @@
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="../../base_service_intf.pas"/>
<Filename Value="..\..\base_service_intf.pas"/>
<UnitName Value="base_service_intf"/>
<CursorPos X="52" Y="4125"/>
<TopLine Value="4118"/>
<EditorIndex Value="7"/>
<EditorIndex Value="6"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="../../semaphore.pas"/>
<Filename Value="..\..\semaphore.pas"/>
<UnitName Value="semaphore"/>
<CursorPos X="1" Y="140"/>
<TopLine Value="116"/>
<TopLine Value="111"/>
<EditorIndex Value="4"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="../../wst_rtti_filter/cursor_intf.pas"/>
<Filename Value="..\..\wst_rtti_filter\cursor_intf.pas"/>
<UnitName Value="cursor_intf"/>
<CursorPos X="2" Y="13"/>
<TopLine Value="34"/>
@ -99,30 +100,24 @@
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="../../../../lazarus/lazarus/others_package/indy/indy-10.2.0.1/lazarus/IdDsnCoreResourceStrings.pas"/>
<Filename Value="..\..\..\..\lazarus\lazarus\others_package\indy\indy-10.2.0.1\lazarus\IdDsnCoreResourceStrings.pas"/>
<UnitName Value="IdDsnCoreResourceStrings"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit8>
</Units>
<JumpHistory Count="1" HistoryIndex="0">
<Position1>
<Filename Value="../../semaphore.pas"/>
<Caret Line="140" Column="1" TopLine="113"/>
</Position1>
</JumpHistory>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="lib_server.dll"/>
</Target>
<SearchPaths>
<IncludeFiles Value="../../"/>
<OtherUnitFiles Value="../;../../;../../wst_rtti_filter/"/>
<IncludeFiles Value="..\..\"/>
<OtherUnitFiles Value="..\;..\..\;..\..\wst_rtti_filter\"/>
<UnitOutputDirectory Value="obj"/>
</SearchPaths>
<CodeGeneration>
@ -144,19 +139,19 @@
<Debugging>
<BreakPoints Count="4">
<Item1>
<Source Value="D:/lazarusClean/fpcsrc/rtl/inc/getopts.pp"/>
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="230"/>
</Item1>
<Item2>
<Source Value="D:/lazarusClean/fpcsrc/rtl/inc/getopts.pp"/>
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="193"/>
</Item2>
<Item3>
<Source Value="D:/lazarusClean/fpcsrc/rtl/inc/getopts.pp"/>
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="198"/>
</Item3>
<Item4>
<Source Value="../../ws_helper/wsdl2pas_imp.pas"/>
<Source Value="..\..\ws_helper\wsdl2pas_imp.pas"/>
<Line Value="606"/>
</Item4>
</BreakPoints>

View File

@ -35,8 +35,8 @@
<Filename Value="user_client_console.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="user_client_console"/>
<CursorPos X="14" Y="269"/>
<TopLine Value="252"/>
<CursorPos X="111" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="76"/>
<Loaded Value="True"/>
@ -46,16 +46,16 @@
<UnitName Value="user_service_intf_proxy"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<EditorIndex Value="4"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\..\synapse_tcp_protocol.pas"/>
<UnitName Value="synapse_tcp_protocol"/>
<CursorPos X="17" Y="29"/>
<TopLine Value="16"/>
<EditorIndex Value="14"/>
<CursorPos X="1" Y="23"/>
<TopLine Value="1"/>
<EditorIndex Value="12"/>
<UsageCount Value="37"/>
<Loaded Value="True"/>
</Unit2>
@ -64,7 +64,7 @@
<UnitName Value="service_intf"/>
<CursorPos X="51" Y="34"/>
<TopLine Value="21"/>
<EditorIndex Value="11"/>
<EditorIndex Value="10"/>
<UsageCount Value="33"/>
<Loaded Value="True"/>
</Unit3>
@ -73,7 +73,7 @@
<UnitName Value="user_service_intf"/>
<CursorPos X="53" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="4"/>
<EditorIndex Value="5"/>
<UsageCount Value="29"/>
<Loaded Value="True"/>
</Unit4>
@ -94,9 +94,9 @@
<Unit7>
<Filename Value="..\..\library_protocol.pas"/>
<UnitName Value="library_protocol"/>
<CursorPos X="57" Y="57"/>
<TopLine Value="2"/>
<EditorIndex Value="10"/>
<CursorPos X="1" Y="24"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit7>
@ -140,8 +140,8 @@
<Unit14>
<Filename Value="..\..\synapse_http_protocol.pas"/>
<UnitName Value="synapse_http_protocol"/>
<CursorPos X="15" Y="59"/>
<TopLine Value="45"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="13"/>
<EditorIndex Value="9"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
@ -177,7 +177,7 @@
<UnitName Value="semaphore"/>
<CursorPos X="1" Y="140"/>
<TopLine Value="111"/>
<EditorIndex Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit19>
@ -186,9 +186,7 @@
<UnitName Value="soap_formatter"/>
<CursorPos X="3" Y="232"/>
<TopLine Value="221"/>
<EditorIndex Value="8"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="..\..\xmlrpc_formatter.pas"/>
@ -203,7 +201,7 @@
<UnitName Value="binary_formatter"/>
<CursorPos X="20" Y="21"/>
<TopLine Value="12"/>
<EditorIndex Value="12"/>
<EditorIndex Value="11"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit22>
@ -266,9 +264,7 @@
<UnitName Value="wst_fpc_xml"/>
<CursorPos X="34" Y="67"/>
<TopLine Value="42"/>
<EditorIndex Value="13"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
@ -310,7 +306,7 @@
<UnitName Value="indy_http_protocol"/>
<CursorPos X="1" Y="16"/>
<TopLine Value="109"/>
<EditorIndex Value="7"/>
<EditorIndex Value="8"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit37>
@ -324,25 +320,27 @@
<Unit39>
<Filename Value="..\..\ics_tcp_protocol.pas"/>
<UnitName Value="ics_tcp_protocol"/>
<CursorPos X="1" Y="31"/>
<TopLine Value="18"/>
<CursorPos X="1" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="1"/>
<UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit39>
<Unit40>
<Filename Value="..\..\ics_http_protocol.pas"/>
<UnitName Value="ics_http_protocol"/>
<CursorPos X="55" Y="72"/>
<TopLine Value="128"/>
<EditorIndex Value="6"/>
<CursorPos X="1" Y="25"/>
<TopLine Value="1"/>
<EditorIndex Value="7"/>
<UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit40>
<Unit41>
<Filename Value="..\..\same_process_protocol.pas"/>
<UnitName Value="same_process_protocol"/>
<CursorPos X="77" Y="83"/>
<TopLine Value="31"/>
<EditorIndex Value="5"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="13"/>
<EditorIndex Value="6"/>
<UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit41>
@ -354,12 +352,19 @@
<UnitName Value="ubindingedit"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit42>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
<JumpHistory Count="2" HistoryIndex="1">
<Position1>
<Filename Value="user_client_console.pas"/>
<Caret Line="252" Column="5" TopLine="250"/>
</Position1>
<Position2>
<Filename Value="user_client_console.pas"/>
<Caret Line="8" Column="111" TopLine="1"/>
</Position2>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>

View File

@ -5,7 +5,7 @@ program user_client_console;
uses
Classes, SysUtils, TypInfo, {$IFDEF WINDOWS}ActiveX,{$ENDIF}
user_service_intf_proxy,
same_process_protocol, synapse_tcp_protocol, synapse_http_protocol, library_protocol, //ics_tcp_protocol, ics_http_protocol,
same_process_protocol, synapse_tcp_protocol, synapse_http_protocol, library_protocol, ics_tcp_protocol, ics_http_protocol,
soap_formatter, binary_formatter,
user_service_intf, xmlrpc_formatter;

View File

@ -18,9 +18,6 @@ interface
uses
Classes, SysUtils, syncobjs{$IFNDEF FPC},Windows{$ENDIF};
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
type
ESemaphoreException = class(Exception);

View File

@ -22,9 +22,6 @@ uses
service_intf, imp_utils, base_service_intf,
httpsend;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
Const
sTRANSPORT_NAME = 'HTTP';
@ -157,6 +154,14 @@ end;
procedure THTTPTransport.SendAndReceive(ARequest, AResponse: TStream);
{$IFDEF WST_DBG}
procedure Display(const AStr : string);
begin
if IsConsole then
WriteLn(AStr)
{else
ShowMessage(AStr)};
end;
var
s : string;
{$ENDIF}
@ -169,13 +174,13 @@ begin
FConnection.Clear();
{$IFDEF WST_DBG}
TMemoryStream(ARequest).SaveToFile('request.log');
SetLength(s,ARequest.Size);
Move(TMemoryStream(ARequest).Memory^,s[1],Length(s));
Display(s);
SetLength(s,AResponse.Size);
Move(TMemoryStream(AResponse).Memory^,s[1],Length(s));
TMemoryStream(AResponse).SaveToFile('response.log');
if IsConsole then
WriteLn(s)
{else
ShowMessage(s)};
Display(s);
{$ENDIF}
end;

View File

@ -20,10 +20,7 @@ uses
service_intf, imp_utils, base_service_intf,
blcksock;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
{$DEFINE WST_DBG}
//{$DEFINE WST_DBG}
Const
sTRANSPORT_NAME = 'TCP';

View File

@ -1,13 +1,13 @@
GetWSTResourceManager().AddResource('CALCULATOR',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'Result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'Result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'Result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1'A'
+#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1
+#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'Result'#0#0#0
+#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3''
);

View File

@ -2,10 +2,10 @@
This unit has been produced by ws_helper.
Input unit name : "calculator".
This unit name : "calculator_binder".
Date : "12/11/2006 11:22".
Date : "15/08/2007 16:34:20".
}
unit calculator_binder;
{$mode objfpc}{$H+}
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
interface
uses SysUtils, Classes, base_service_intf, server_service_intf, calculator;
@ -14,19 +14,24 @@ type
TCalculator_ServiceBinder = class(TBaseServiceBinder)
Protected
procedure AddIntHandler(AFormatter:IFormatterResponse);
procedure DivIntHandler(AFormatter:IFormatterResponse);
procedure DoAllOperationsHandler(AFormatter:IFormatterResponse);
procedure DoOperationHandler(AFormatter:IFormatterResponse);
Public
protected
procedure AddIntHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
procedure DivIntHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
procedure DoAllOperationsHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
procedure DoOperationHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
public
constructor Create();
End;
end;
TCalculator_ServiceBinderFactory = class(TInterfacedObject,IItemFactory)
private
FInstance : IInterface;
protected
function CreateInstance():IInterface;
End;
public
constructor Create();
destructor Destroy();override;
end;
procedure Server_service_RegisterCalculatorService();
@ -34,9 +39,11 @@ Implementation
uses TypInfo, wst_resources_imp,metadata_repository;
{ TCalculator_ServiceBinder implementation }
procedure TCalculator_ServiceBinder.AddIntHandler(AFormatter:IFormatterResponse);
Var
procedure TCalculator_ServiceBinder.AddIntHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
var
cllCntrl : ICallControl;
objCntrl : IObjectControl;
hasObjCntrl : Boolean;
tmpObj : ICalculator;
callCtx : ICallContext;
strPrmName : string;
@ -44,34 +51,44 @@ Var
A : Integer;
B : Integer;
returnVal : TBinaryArgsResult;
Begin
callCtx := GetCallContext();
Pointer(returnVal) := Nil;
begin
callCtx := AContext;
TObject(returnVal) := nil;
strPrmName := 'A'; AFormatter.Get(TypeInfo(Integer),strPrmName,A);
strPrmName := 'B'; AFormatter.Get(TypeInfo(Integer),strPrmName,B);
tmpObj := Self.GetFactory().CreateInstance() as ICalculator;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(GetCallContext());
cllCntrl.SetCallContext(callCtx);
hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl);
if hasObjCntrl then
objCntrl.Activate();
try
returnVal := tmpObj.AddInt(A,B);
If Assigned(Pointer(returnVal)) Then
if Assigned(TObject(returnVal)) then
callCtx.AddObjectToFree(TObject(returnVal));
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('return',TypeInfo(TBinaryArgsResult),returnVal);
AFormatter.Put('Result',TypeInfo(TBinaryArgsResult),returnVal);
AFormatter.EndCallResponse();
callCtx := Nil;
End;
callCtx := nil;
finally
if hasObjCntrl then
objCntrl.Deactivate();
Self.GetFactory().ReleaseInstance(tmpObj);
end;
end;
procedure TCalculator_ServiceBinder.DivIntHandler(AFormatter:IFormatterResponse);
Var
procedure TCalculator_ServiceBinder.DivIntHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
var
cllCntrl : ICallControl;
objCntrl : IObjectControl;
hasObjCntrl : Boolean;
tmpObj : ICalculator;
callCtx : ICallContext;
strPrmName : string;
@ -79,31 +96,41 @@ Var
A : Integer;
B : Integer;
returnVal : Integer;
Begin
callCtx := GetCallContext();
begin
callCtx := AContext;
strPrmName := 'A'; AFormatter.Get(TypeInfo(Integer),strPrmName,A);
strPrmName := 'B'; AFormatter.Get(TypeInfo(Integer),strPrmName,B);
tmpObj := Self.GetFactory().CreateInstance() as ICalculator;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(GetCallContext());
cllCntrl.SetCallContext(callCtx);
hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl);
if hasObjCntrl then
objCntrl.Activate();
try
returnVal := tmpObj.DivInt(A,B);
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('return',TypeInfo(Integer),returnVal);
AFormatter.Put('Result',TypeInfo(Integer),returnVal);
AFormatter.EndCallResponse();
callCtx := Nil;
End;
callCtx := nil;
finally
if hasObjCntrl then
objCntrl.Deactivate();
Self.GetFactory().ReleaseInstance(tmpObj);
end;
end;
procedure TCalculator_ServiceBinder.DoAllOperationsHandler(AFormatter:IFormatterResponse);
Var
procedure TCalculator_ServiceBinder.DoAllOperationsHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
var
cllCntrl : ICallControl;
objCntrl : IObjectControl;
hasObjCntrl : Boolean;
tmpObj : ICalculator;
callCtx : ICallContext;
strPrmName : string;
@ -111,34 +138,44 @@ Var
A : Integer;
B : Integer;
returnVal : TBinaryArgsResultArray;
Begin
callCtx := GetCallContext();
Pointer(returnVal) := Nil;
begin
callCtx := AContext;
TObject(returnVal) := nil;
strPrmName := 'A'; AFormatter.Get(TypeInfo(Integer),strPrmName,A);
strPrmName := 'B'; AFormatter.Get(TypeInfo(Integer),strPrmName,B);
tmpObj := Self.GetFactory().CreateInstance() as ICalculator;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(GetCallContext());
cllCntrl.SetCallContext(callCtx);
hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl);
if hasObjCntrl then
objCntrl.Activate();
try
returnVal := tmpObj.DoAllOperations(A,B);
If Assigned(Pointer(returnVal)) Then
if Assigned(TObject(returnVal)) then
callCtx.AddObjectToFree(TObject(returnVal));
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('return',TypeInfo(TBinaryArgsResultArray),returnVal);
AFormatter.Put('Result',TypeInfo(TBinaryArgsResultArray),returnVal);
AFormatter.EndCallResponse();
callCtx := Nil;
End;
callCtx := nil;
finally
if hasObjCntrl then
objCntrl.Deactivate();
Self.GetFactory().ReleaseInstance(tmpObj);
end;
end;
procedure TCalculator_ServiceBinder.DoOperationHandler(AFormatter:IFormatterResponse);
Var
procedure TCalculator_ServiceBinder.DoOperationHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
var
cllCntrl : ICallControl;
objCntrl : IObjectControl;
hasObjCntrl : Boolean;
tmpObj : ICalculator;
callCtx : ICallContext;
strPrmName : string;
@ -147,9 +184,9 @@ Var
B : Integer;
AOperation : TCalc_Op;
returnVal : TBinaryArgsResult;
Begin
callCtx := GetCallContext();
Pointer(returnVal) := Nil;
begin
callCtx := AContext;
TObject(returnVal) := nil;
strPrmName := 'A'; AFormatter.Get(TypeInfo(Integer),strPrmName,A);
strPrmName := 'B'; AFormatter.Get(TypeInfo(Integer),strPrmName,B);
@ -157,38 +194,58 @@ Begin
tmpObj := Self.GetFactory().CreateInstance() as ICalculator;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(GetCallContext());
cllCntrl.SetCallContext(callCtx);
hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl);
if hasObjCntrl then
objCntrl.Activate();
try
returnVal := tmpObj.DoOperation(A,B,AOperation);
If Assigned(Pointer(returnVal)) Then
if Assigned(TObject(returnVal)) then
callCtx.AddObjectToFree(TObject(returnVal));
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('return',TypeInfo(TBinaryArgsResult),returnVal);
AFormatter.Put('Result',TypeInfo(TBinaryArgsResult),returnVal);
AFormatter.EndCallResponse();
callCtx := Nil;
End;
callCtx := nil;
finally
if hasObjCntrl then
objCntrl.Deactivate();
Self.GetFactory().ReleaseInstance(tmpObj);
end;
end;
constructor TCalculator_ServiceBinder.Create();
Begin
Inherited Create(GetServiceImplementationRegistry().FindFactory('ICalculator'));
RegisterVerbHandler('AddInt',@AddIntHandler);
RegisterVerbHandler('DivInt',@DivIntHandler);
RegisterVerbHandler('DoAllOperations',@DoAllOperationsHandler);
RegisterVerbHandler('DoOperation',@DoOperationHandler);
End;
begin
inherited Create(GetServiceImplementationRegistry().FindFactory('ICalculator'));
RegisterVerbHandler('AddInt',{$IFDEF FPC}@{$ENDIF}AddIntHandler);
RegisterVerbHandler('DivInt',{$IFDEF FPC}@{$ENDIF}DivIntHandler);
RegisterVerbHandler('DoAllOperations',{$IFDEF FPC}@{$ENDIF}DoAllOperationsHandler);
RegisterVerbHandler('DoOperation',{$IFDEF FPC}@{$ENDIF}DoOperationHandler);
end;
{ TCalculator_ServiceBinderFactory }
function TCalculator_ServiceBinderFactory.CreateInstance():IInterface;
Begin
Result := TCalculator_ServiceBinder.Create() as IInterface;
End;
begin
Result := FInstance;
end;
constructor TCalculator_ServiceBinderFactory.Create();
begin
FInstance := TCalculator_ServiceBinder.Create() as IInterface;
end;
destructor TCalculator_ServiceBinderFactory.Destroy();
begin
FInstance := nil;
inherited Destroy();
end;
procedure Server_service_RegisterCalculatorService();
@ -198,10 +255,10 @@ End;
initialization
{$IF DECLARED(Register_calculator_NameSpace)}
Register_calculator_NameSpace();
{$ENDIF}
{$i calculator.wst}
{$IF DECLARED(Register_calculator_ServiceMetadata)}
Register_calculator_ServiceMetadata();
{$IFEND}
End.

View File

@ -2,10 +2,10 @@
This unit has been produced by ws_helper.
Input unit name : "calculator".
This unit name : "calculator_imp".
Date : "02/07/2006 16:49".
Date : "15/08/2007 16:34:20".
}
Unit calculator_imp;
{$mode objfpc}{$H+}
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
Interface
Uses SysUtils, Classes,
@ -17,21 +17,21 @@ Type
TCalculator_ServiceImp=class(TBaseServiceImplementation,ICalculator)
Protected
function AddInt(
Const A : Integer;
Const B : Integer
const A : Integer;
const B : Integer
):TBinaryArgsResult;
function DivInt(
Const A : Integer;
Const B : Integer
const A : Integer;
const B : Integer
):Integer;
function DoAllOperations(
Const A : Integer;
Const B : Integer
const A : Integer;
const B : Integer
):TBinaryArgsResultArray;
function DoOperation(
Const A : Integer;
Const B : Integer;
Const AOperation : TCalc_Op
const A : Integer;
const B : Integer;
const AOperation : TCalc_Op
):TBinaryArgsResult;
End;
@ -39,119 +39,47 @@ Type
procedure RegisterCalculatorImplementationFactory();
Implementation
uses config_objects;
{ TCalculator_ServiceImp implementation }
function TCalculator_ServiceImp.AddInt(
Const A : Integer;
Const B : Integer
const A : Integer;
const B : Integer
):TBinaryArgsResult;
var
hdr : TCalcResultHeader;
h : TCalcHeader;
cc : ICallContext;
Begin
hdr := TCalcResultHeader.Create();
cc := GetCallContext();
if Assigned(cc) and ( cc.GetHeaderCount([hdIn]) > 0 ) and ( cc.GetHeader(0).InheritsFrom(TCalcHeader) ) then begin
h := cc.GetHeader(0) as TCalcHeader;
h.Understood := True;
hdr.Assign(h);
end;
hdr.TimeStamp := DateTimeToStr(Now());
hdr.SessionID := 'testSession';
cc.AddHeader(hdr,True);
hdr := nil;
Result := TBinaryArgsResult.Create();
Try
Result.Arg_OP := '+';
Result.Arg_OpEnum := coAdd;
Result.Arg_A := A;
Result.Arg_B := B;
Result.Arg_R := A + B;
Result.Comment := 'Doing an + operation';
Except
FreeAndNil(Result);
Raise;
End;
// your code here
End;
function TCalculator_ServiceImp.DivInt(
Const A : Integer;
Const B : Integer
const A : Integer;
const B : Integer
):Integer;
Begin
Result := A div B;
// your code here
End;
function TCalculator_ServiceImp.DoAllOperations(
Const A : Integer;
Const B : Integer
const A : Integer;
const B : Integer
):TBinaryArgsResultArray;
Begin
Result := TBinaryArgsResultArray.Create();
Result.SetLength(4);
With Result[0] do Begin
Arg_A := A;
Arg_B := B;
Arg_OP := '-';
Arg_OpEnum := coSub;
Arg_R := Arg_A - Arg_B;
End;
With Result[1] do Begin
Arg_A := A;
Arg_B := B;
Arg_OP := '+';
Arg_OpEnum := coAdd;
Arg_R := Arg_A + Arg_B;
End;
With Result[2] do Begin
Arg_A := A;
Arg_B := B;
Arg_OP := '*';
Arg_OpEnum := coMul;
Arg_R := Arg_A * Arg_B;
End;
With Result[3] do Begin
Arg_A := A;
Arg_B := B;
Arg_OP := '/';
Arg_OpEnum := coDiv;
Arg_R := Arg_A div Arg_B;
End;
// your code here
End;
function TCalculator_ServiceImp.DoOperation(
Const A : Integer;
Const B : Integer;
Const AOperation : TCalc_Op
const A : Integer;
const B : Integer;
const AOperation : TCalc_Op
):TBinaryArgsResult;
Begin
Result := TBinaryArgsResult.Create();
try
Result.Arg_A := A;
Result.Arg_B := B;
Result.Arg_OP := 'X';
Result.Arg_OpEnum := AOperation;
Result.Comment := 'Doing an operation...';
case AOperation of
coAdd : Result.Arg_R := Result.Arg_A + Result.Arg_B;
coSub : Result.Arg_R := Result.Arg_A - Result.Arg_B;
coMul : Result.Arg_R := Result.Arg_A * Result.Arg_B;
coDiv : Result.Arg_R := Result.Arg_A div Result.Arg_B;
end;
except
FreeAndNil(Result);
raise;
end;
// your code here
End;
procedure RegisterCalculatorImplementationFactory();
Begin
GetServiceImplementationRegistry().Register(
'ICalculator',
TImplementationFactory.Create(TCalculator_ServiceImp) as IServiceImplementationFactory
).RegisterExtension(['TLoggerServiceExtension']);
GetServiceImplementationRegistry().Register('ICalculator',TImplementationFactory.Create(TCalculator_ServiceImp,wst_GetServiceConfigText('ICalculator')) as IServiceImplementationFactory);
End;
End.

View File

@ -64,9 +64,8 @@ uses base_service_intf,
server_service_soap, server_binary_formatter,
metadata_repository, metadata_wsdl, DOM, XMLWrite,
calculator, calculator_binder, calculator_imp,
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;
const
sSEPARATOR = '/';

View File

@ -12,7 +12,7 @@
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="13"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<PublishOptions>
<Version Value="2"/>
@ -37,8 +37,8 @@
<IsPartOfProject Value="True"/>
<UnitName Value="wst_http_server"/>
<CursorPos X="1" Y="40"/>
<TopLine Value="18"/>
<EditorIndex Value="13"/>
<TopLine Value="11"/>
<EditorIndex Value="10"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit0>
@ -46,7 +46,7 @@
<Filename Value="app_object.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="app_object"/>
<CursorPos X="43" Y="69"/>
<CursorPos X="1" Y="69"/>
<TopLine Value="50"/>
<EditorIndex Value="0"/>
<UsageCount Value="202"/>
@ -170,7 +170,7 @@
<UnitName Value="base_service_intf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="82"/>
<EditorIndex Value="8"/>
<EditorIndex Value="5"/>
<UsageCount Value="201"/>
<Bookmarks Count="1">
<Item0 X="52" Y="707" ID="1"/>
@ -199,7 +199,7 @@
<UnitName Value="server_service_soap"/>
<CursorPos X="14" Y="22"/>
<TopLine Value="13"/>
<EditorIndex Value="9"/>
<EditorIndex Value="6"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit21>
@ -287,7 +287,7 @@
<UnitName Value="base_soap_formatter"/>
<CursorPos X="21" Y="121"/>
<TopLine Value="109"/>
<EditorIndex Value="10"/>
<EditorIndex Value="7"/>
<UsageCount Value="59"/>
<Loaded Value="True"/>
</Unit32>
@ -438,7 +438,7 @@
<Filename Value="..\..\metadata_service_imp.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="metadata_service_imp"/>
<CursorPos X="13" Y="8"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="196"/>
@ -489,9 +489,9 @@
<Filename Value="..\calculator\srv\calculator_binder.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="calculator_binder"/>
<CursorPos X="16" Y="205"/>
<TopLine Value="165"/>
<EditorIndex Value="12"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="133"/>
<Loaded Value="True"/>
</Unit62>
@ -501,7 +501,7 @@
<UnitName Value="calculator"/>
<CursorPos X="44" Y="19"/>
<TopLine Value="79"/>
<EditorIndex Value="11"/>
<EditorIndex Value="8"/>
<UsageCount Value="133"/>
<Loaded Value="True"/>
</Unit63>
@ -570,18 +570,14 @@
<UnitName Value="user_service_intf_binder"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="7"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit73>
<Unit74>
<Filename Value="user_service_intf_imp.pas"/>
<UnitName Value="user_service_intf_imp"/>
<CursorPos X="3" Y="56"/>
<TopLine Value="54"/>
<EditorIndex Value="6"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit74>
<Unit75>
<Filename Value="user_service_intf.wst"/>
@ -595,9 +591,7 @@
<UnitName Value="user_service_intf"/>
<CursorPos X="21" Y="43"/>
<TopLine Value="33"/>
<EditorIndex Value="5"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit76>
<Unit77>
<Filename Value="..\calculator\srv\calculator.wst"/>
@ -640,27 +634,15 @@
<UsageCount Value="10"/>
</Unit82>
</Units>
<JumpHistory Count="5" HistoryIndex="4">
<JumpHistory Count="2" HistoryIndex="1">
<Position1>
<Filename Value="..\..\metadata_wsdl.pas"/>
<Caret Line="369" Column="44" TopLine="358"/>
<Filename Value="..\calculator\srv\calculator_binder.pas"/>
<Caret Line="205" Column="16" TopLine="165"/>
</Position1>
<Position2>
<Filename Value="user_service_intf_imp.pas"/>
<Caret Line="70" Column="1" TopLine="29"/>
<Filename Value="..\..\metadata_service_imp.pas"/>
<Caret Line="8" Column="13" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="user_service_intf_imp.pas"/>
<Caret Line="23" Column="15" TopLine="12"/>
</Position3>
<Position4>
<Filename Value="user_service_intf_imp.pas"/>
<Caret Line="21" Column="3" TopLine="17"/>
</Position4>
<Position5>
<Filename Value="wst_http_server.pas"/>
<Caret Line="22" Column="24" TopLine="1"/>
</Position5>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>

View File

@ -0,0 +1,222 @@
<?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="16">
<Unit0>
<Filename Value="record_client.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="record_client"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="..\record_sample.pas"/>
<UnitName Value="record_sample"/>
<CursorPos X="53" Y="16"/>
<TopLine Value="13"/>
<EditorIndex Value="9"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\record_sample_proxy.pas"/>
<UnitName Value="record_sample_proxy"/>
<CursorPos X="1" Y="56"/>
<TopLine Value="41"/>
<EditorIndex Value="8"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="..\record_sample.wst"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
<SyntaxHighlighter Value="None"/>
</Unit3>
<Unit4>
<Filename Value="..\..\..\synapse_http_protocol.pas"/>
<UnitName Value="synapse_http_protocol"/>
<CursorPos X="1" Y="16"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="..\..\..\record_rtti.pas"/>
<UnitName Value="record_rtti"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="..\..\..\base_service_intf.pas"/>
<UnitName Value="base_service_intf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="..\..\..\wst_types.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_types"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="7"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="..\..\..\base_soap_formatter.pas"/>
<UnitName Value="base_soap_formatter"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="4"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
<Filename Value="..\..\..\soap_formatter.pas"/>
<UnitName Value="soap_formatter"/>
<CursorPos X="1" Y="188"/>
<TopLine Value="173"/>
<EditorIndex Value="1"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="..\..\..\imp_utils.pas"/>
<UnitName Value="imp_utils"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\classes\classesh.inc"/>
<CursorPos X="15" Y="513"/>
<TopLine Value="498"/>
<UsageCount Value="9"/>
</Unit11>
<Unit12>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\classes\stringl.inc"/>
<CursorPos X="54" Y="230"/>
<TopLine Value="222"/>
<UsageCount Value="9"/>
</Unit12>
<Unit13>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\strutils.pp"/>
<UnitName Value="strutils"/>
<CursorPos X="21" Y="32"/>
<TopLine Value="163"/>
<UsageCount Value="9"/>
</Unit13>
<Unit14>
<Filename Value="..\..\..\service_intf.pas"/>
<UnitName Value="service_intf"/>
<CursorPos X="1" Y="220"/>
<TopLine Value="205"/>
<UsageCount Value="10"/>
</Unit14>
<Unit15>
<Filename Value="..\..\..\indy_http_protocol.pas"/>
<UnitName Value="indy_http_protocol"/>
<CursorPos X="15" Y="35"/>
<TopLine Value="20"/>
<UsageCount Value="10"/>
</Unit15>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
<OtherUnitFiles Value="..\;..\..\;..\..\..\;$(LazarusDir)\others_package\synapse\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Core\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Protocols\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\System\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
<UnitOutputDirectory Value="obj"/>
<SrcPath Value="$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Core\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Protocols\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\System\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="6">
<Item1>
<Source Value="..\..\..\metadata_wsdl.pas"/>
<Line Value="459"/>
</Item1>
<Item2>
<Source Value="..\..\..\metadata_wsdl.pas"/>
<Line Value="468"/>
</Item2>
<Item3>
<Source Value="..\..\..\metadata_wsdl.pas"/>
<Line Value="431"/>
</Item3>
<Item4>
<Source Value="..\..\..\server_service_intf.pas"/>
<Line Value="630"/>
</Item4>
<Item5>
<Source Value="..\..\..\base_service_intf.pas"/>
<Line Value="4634"/>
</Item5>
<Item6>
<Source Value="..\..\..\base_service_intf.pas"/>
<Line Value="4711"/>
</Item6>
</BreakPoints>
<Exceptions Count="2">
<Item1>
<Name Value="ECodetoolError"/>
</Item1>
<Item2>
<Name Value="EFOpenError"/>
</Item2>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,110 @@
program record_client;
{$mode objfpc}{$H+}
uses
Classes, SysUtils, {$IFDEF WINDOWS}ActiveX,{$ENDIF}
soap_formatter,
synapse_http_protocol,
//indy_http_protocol,
metadata_repository,
record_sample, record_sample_proxy;
function ReadEntryStr(const APromp : string):string ;
begin
Result := '';
Write(APromp);
while True do begin
ReadLn(Result);
Result := Trim(Result);
if ( Length(Result) > 0 ) then
Break;
end;
end;
function ReadEntryInt(const APromp : string):Integer ;
var
locBuffer : string;
begin
Write(APromp);
while True do begin
ReadLn(locBuffer);
locBuffer := Trim(locBuffer);
if TryStrToInt(locBuffer,Result) then
Break;
end;
end;
function ReadEntryFloat(const APromp : string) : Single ;
var
locBuffer : string;
begin
Write(APromp);
while True do begin
ReadLn(locBuffer);
locBuffer := Trim(locBuffer);
if TryStrToFloat(locBuffer,Result) then
Break;
end;
end;
var
locService : RecordService;
A : RecordA;
B : RecordB;
C : RecordC;
begin
{$IFDEF WINDOWS}
CoInitialize(nil);
try
{$ENDIF}
SYNAPSE_RegisterHTTP_Transport();
//INDY_RegisterHTTP_Transport();
WriteLn('Web Services Toolkit Record sample');
WriteLn('This sample demonstrates the Object Pascal "Record" support by WST');
WriteLn();
locService := TRecordService_Proxy.Create(
'RecordService','soap:Style=RPC;EncodingStyle=Literal','http:address=http://127.0.0.1:20000/services/RecordService');
while True do begin
A.fieldA := 0;
A.fieldB := 0;
C.intField := 1;
C.RecordField.RecordField.fieldA := 21;
C.RecordField.RecordField.fieldB := 22;
C.RecordField.RecordField.comment := 'Comment 23';
C.RecordField.intField := 3;
C.RecordField.RecordField.comment := '31 comment';
C.RecordField.comment := 'xx comment ddf';
A.fieldA := ReadEntryInt('Enter the Integer field : ');
A.fieldB := ReadEntryFloat('Enter the Single field : ');
B.intField := 2 * A.fieldA;
B := locService.Add(A);
WriteLn;
WriteLn('Response ( B ) : ');
WriteLn(' intField : ',B.intField);
WriteLn(' singleField : ',B.singleField);
WriteLn(' comment : ',B.comment);
WriteLn();
WriteLn;
C := locService.AddRec(A,B,C);
WriteLn;
WriteLn('Response ( C ) : ');
WriteLn(' intField : ',C.intField);
WriteLn(' RecordField.intField : ',C.RecordField.intField);
WriteLn(' RecordField.singleField : ',C.RecordField.singleField);
WriteLn(' RecordField.singleField : ',C.RecordField.comment);
WriteLn(' RecordField.RecordField.fieldA : ',C.RecordField.RecordField.fieldA);
WriteLn(' RecordField.RecordField.fieldB : ',C.RecordField.RecordField.fieldB);
WriteLn(' RecordField.RecordField.comment : ',C.RecordField.RecordField.comment);
WriteLn();
if ( UpperCase(ReadEntryStr('Continue ( Y/N ) :'))[1] <> 'Y' ) then
Break;
end;
{$IFDEF WINDOWS}
finally
CoUninitialize();
end;
{$ENDIF}
end.

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<definitions name="urn:record_sample" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:record_sample" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="urn:record_sample">
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:record_sample">
<xsd:complexType name="TRecordClass">
<xsd:sequence>
<xsd:element name="fieldA" type="xsd:int" maxOccurs="1" minOccurs="1"/>
<xsd:element name="fieldB" type="xsd:single" maxOccurs="1" minOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="Add"><part name="AValue" type="tns:TRecordClass"/></message>
<message name="AddResponse"><part name="result" type="xsd:long"/></message>
<portType name="RecordService">
<document><GUID value="{E42B7653-4B50-4956-88B4-FBCEC57B667A}"/></document>
<operation name="Add">
<input message="tns:Add"/>
<output message="tns:AddResponse"/>
</operation>
</portType>
<binding name="RecordServiceBinding" type="tns:RecordService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="Add">
<soap:operation soapAction=""/>
<input><soap:body use="literal" namespace="urn:record_sample"/></input>
<output><soap:body use="literal" namespace="urn:record_sample"/></output>
</operation>
</binding>
<service name="RecordService">
<port name="RecordServicePort" binding="tns:RecordServiceBinding"><soap:address location="http://127.0.0.1:20000"/></port>
</service>
</definitions>

View File

@ -0,0 +1,146 @@
{
This unit has been produced by ws_helper.
Input unit name : "record_sample".
This unit name : "record_sample".
Date : "17/08/2007 19:37:26".
}
unit record_sample;
{$IFDEF FPC}
{$mode objfpc} {$H+}
{$ENDIF}
{$IFNDEF FPC}
{$DEFINE WST_RECORD_RTTI}
{$ENDIF}
interface
uses SysUtils, Classes, TypInfo, base_service_intf, service_intf;
const
sNAME_SPACE = 'record_sample';
sUNIT_NAME = 'record_sample';
type
RecordA = record
fieldB : Single;
fieldA : Integer;
comment : String;
end;
RecordB = record
singleField : Single;
intField : Integer;
comment : String;
RecordField : RecordA;
end;
RecordC = record
intField : Integer;
RecordField : RecordB;
end;
RecordService = interface(IInvokable)
['{E42B7653-4B50-4956-88B4-FBCEC57B667A}']
function Add(
const AValue : RecordA
):RecordB;
function AddRec(
const AA : RecordA;
const AB : RecordB;
const AC : RecordC
):RecordC;
end;
procedure Register_record_sample_ServiceMetadata();
Implementation
uses metadata_repository, record_rtti, wst_types;
procedure Register_record_sample_ServiceMetadata();
var
mm : IModuleMetadataMngr;
begin
mm := GetModuleMetadataMngr();
mm.SetRepositoryNameSpace(sUNIT_NAME, sNAME_SPACE);
end;
{$IFDEF WST_RECORD_RTTI}
function __RecordA_TYPEINFO_FUNC__() : PTypeInfo;
var
p : ^RecordA;
r : RecordA;
begin
p := @r;
Result := MakeRawTypeInfo(
'RecordA',
SizeOf(RecordA),
[ PtrUInt(@(p^.fieldB)) - PtrUInt(p), PtrUInt(@(p^.fieldA)) - PtrUInt(p), PtrUInt(@(p^.comment)) - PtrUInt(p) ],
[ TypeInfo(Single), TypeInfo(Integer), TypeInfo(String) ]
);
end;
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
function __RecordB_TYPEINFO_FUNC__() : PTypeInfo;
var
p : ^RecordB;
r : RecordB;
begin
p := @r;
Result := MakeRawTypeInfo(
'RecordB',
SizeOf(RecordB),
[ PtrUInt(@(p^.singleField)) - PtrUInt(p), PtrUInt(@(p^.intField)) - PtrUInt(p), PtrUInt(@(p^.comment)) - PtrUInt(p), PtrUInt(@(p^.RecordField)) - PtrUInt(p) ],
[ TypeInfo(Single), TypeInfo(Integer), TypeInfo(String), TypeInfo(RecordA) ]
);
end;
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
function __RecordC_TYPEINFO_FUNC__() : PTypeInfo;
var
p : ^RecordC;
r : RecordC;
begin
p := @r;
Result := MakeRawTypeInfo(
'RecordC',
SizeOf(RecordC),
[ PtrUInt(@(p^.intField)) - PtrUInt(p), PtrUInt(@(p^.RecordField)) - PtrUInt(p) ],
[ TypeInfo(Integer), TypeInfo(RecordB) ]
);
end;
{$ENDIF WST_RECORD_RTTI}
initialization
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(RecordA),'RecordA').RegisterExternalPropertyName('__FIELDS__','fieldB;fieldA;comment');
{$IFNDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordA)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(TypeInfo(RecordA)),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordA)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordA)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__RecordA_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordA)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(RecordB),'RecordB').RegisterExternalPropertyName('__FIELDS__','singleField;intField;comment;RecordField');
{$IFNDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordB)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(TypeInfo(RecordB)),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordB)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordB)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__RecordB_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordB)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(RecordC),'RecordC').RegisterExternalPropertyName('__FIELDS__','intField;RecordField');
{$IFNDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordC)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(TypeInfo(RecordC)),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordC)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordC)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__RecordC_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordC)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
End.

View File

@ -0,0 +1,165 @@
{
This unit has been produced by ws_helper.
Input unit name : "record_sample".
This unit name : "record_sample_binder".
Date : "17/08/2007 19:37:26".
}
unit record_sample_binder;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
interface
uses SysUtils, Classes, base_service_intf, server_service_intf, record_sample;
type
TRecordService_ServiceBinder = class(TBaseServiceBinder)
protected
procedure AddHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
procedure AddRecHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
public
constructor Create();
end;
TRecordService_ServiceBinderFactory = class(TInterfacedObject,IItemFactory)
private
FInstance : IInterface;
protected
function CreateInstance():IInterface;
public
constructor Create();
destructor Destroy();override;
end;
procedure Server_service_RegisterRecordServiceService();
Implementation
uses TypInfo, wst_resources_imp,metadata_repository;
{ TRecordService_ServiceBinder implementation }
procedure TRecordService_ServiceBinder.AddHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
var
cllCntrl : ICallControl;
objCntrl : IObjectControl;
hasObjCntrl : Boolean;
tmpObj : RecordService;
callCtx : ICallContext;
strPrmName : string;
procName,trgName : string;
AValue : RecordA;
returnVal : RecordB;
begin
callCtx := AContext;
strPrmName := 'AValue'; AFormatter.Get(TypeInfo(RecordA),strPrmName,AValue);
tmpObj := Self.GetFactory().CreateInstance() as RecordService;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(callCtx);
hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl);
if hasObjCntrl then
objCntrl.Activate();
try
returnVal := tmpObj.Add(AValue);
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('Result',TypeInfo(RecordB),returnVal);
AFormatter.EndCallResponse();
callCtx := nil;
finally
if hasObjCntrl then
objCntrl.Deactivate();
Self.GetFactory().ReleaseInstance(tmpObj);
end;
end;
procedure TRecordService_ServiceBinder.AddRecHandler(AFormatter : IFormatterResponse; AContext : ICallContext);
var
cllCntrl : ICallControl;
objCntrl : IObjectControl;
hasObjCntrl : Boolean;
tmpObj : RecordService;
callCtx : ICallContext;
strPrmName : string;
procName,trgName : string;
AA : RecordA;
AB : RecordB;
AC : RecordC;
returnVal : RecordC;
begin
callCtx := AContext;
strPrmName := 'AA'; AFormatter.Get(TypeInfo(RecordA),strPrmName,AA);
strPrmName := 'AB'; AFormatter.Get(TypeInfo(RecordB),strPrmName,AB);
strPrmName := 'AC'; AFormatter.Get(TypeInfo(RecordC),strPrmName,AC);
tmpObj := Self.GetFactory().CreateInstance() as RecordService;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(callCtx);
hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl);
if hasObjCntrl then
objCntrl.Activate();
try
returnVal := tmpObj.AddRec(AA,AB,AC);
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('Result',TypeInfo(RecordC),returnVal);
AFormatter.EndCallResponse();
callCtx := nil;
finally
if hasObjCntrl then
objCntrl.Deactivate();
Self.GetFactory().ReleaseInstance(tmpObj);
end;
end;
constructor TRecordService_ServiceBinder.Create();
begin
inherited Create(GetServiceImplementationRegistry().FindFactory('RecordService'));
RegisterVerbHandler('Add',{$IFDEF FPC}@{$ENDIF}AddHandler);
RegisterVerbHandler('AddRec',{$IFDEF FPC}@{$ENDIF}AddRecHandler);
end;
{ TRecordService_ServiceBinderFactory }
function TRecordService_ServiceBinderFactory.CreateInstance():IInterface;
begin
Result := FInstance;
end;
constructor TRecordService_ServiceBinderFactory.Create();
begin
FInstance := TRecordService_ServiceBinder.Create() as IInterface;
end;
destructor TRecordService_ServiceBinderFactory.Destroy();
begin
FInstance := nil;
inherited Destroy();
end;
procedure Server_service_RegisterRecordServiceService();
Begin
GetServerServiceRegistry().Register('RecordService',TRecordService_ServiceBinderFactory.Create() as IItemFactory);
End;
initialization
{$i record_sample.wst}
{$IF DECLARED(Register_record_sample_ServiceMetadata)}
Register_record_sample_ServiceMetadata();
{$IFEND}
End.

View File

@ -0,0 +1,67 @@
{
This unit has been produced by ws_helper.
Input unit name : "record_sample".
This unit name : "record_sample_imp".
Date : "17/08/2007 19:37:26".
}
Unit record_sample_imp;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
Interface
Uses SysUtils, Classes,
base_service_intf, server_service_intf, server_service_imputils, record_sample;
Type
TRecordService_ServiceImp=class(TBaseServiceImplementation,RecordService)
Protected
function Add(
const AValue : RecordA
):RecordB;
function AddRec(
const AA : RecordA;
const AB : RecordB;
const AC : RecordC
):RecordC;
End;
procedure RegisterRecordServiceImplementationFactory();
Implementation
uses config_objects;
{ TRecordService_ServiceImp implementation }
function TRecordService_ServiceImp.Add(
const AValue : RecordA
):RecordB;
Begin
Result.singleField := AValue.fieldA + AValue.fieldB;
Result.intField := Trunc(AValue.fieldA + AValue.fieldB);
Result.comment := 'Computed in Add().';
Result.RecordField := AValue;
End;
function TRecordService_ServiceImp.AddRec(
const AA : RecordA;
const AB : RecordB;
const AC : RecordC
):RecordC;
Begin
Result.RecordField.intField := 1234;
Result.RecordField.RecordField.fieldA := 0;
Result.RecordField.RecordField.fieldB := 0;
Result.intField := Trunc(AA.fieldA + AA.fieldB);
Result.RecordField.singleField := AB.singleField + AB.intField;
Result.RecordField.comment := 'Computed in AddRec().';
End;
procedure RegisterRecordServiceImplementationFactory();
Begin
GetServiceImplementationRegistry().Register('RecordService',TImplementationFactory.Create(TRecordService_ServiceImp,wst_GetServiceConfigText('RecordService')) as IServiceImplementationFactory);
End;
End.

View File

@ -0,0 +1,107 @@
{
This unit has been produced by ws_helper.
Input unit name : "record_sample".
This unit name : "record_sample_proxy".
Date : "17/08/2007 19:37:26".
}
Unit record_sample_proxy;
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
Interface
Uses SysUtils, Classes, TypInfo, base_service_intf, service_intf, record_sample;
Type
TRecordService_Proxy=class(TBaseProxy,RecordService)
Protected
class function GetServiceType() : PTypeInfo;override;
function Add(
const AValue : RecordA
):RecordB;
function AddRec(
const AA : RecordA;
const AB : RecordB;
const AC : RecordC
):RecordC;
End;
Function wst_CreateInstance_RecordService(const AFormat : string = 'SOAP:'; const ATransport : string = 'HTTP:'):RecordService;
Implementation
uses wst_resources_imp, metadata_repository;
Function wst_CreateInstance_RecordService(const AFormat : string; const ATransport : string):RecordService;
Begin
Result := TRecordService_Proxy.Create('RecordService',AFormat+GetServiceDefaultFormatProperties(TypeInfo(RecordService)),ATransport + 'address=' + GetServiceDefaultAddress(TypeInfo(RecordService)));
End;
{ TRecordService_Proxy implementation }
class function TRecordService_Proxy.GetServiceType() : PTypeInfo;
begin
result := TypeInfo(RecordService);
end;
function TRecordService_Proxy.Add(
const AValue : RecordA
):RecordB;
Var
locSerializer : IFormatterClient;
strPrmName : string;
Begin
locSerializer := GetSerializer();
Try
locSerializer.BeginCall('Add', GetTarget(),(Self as ICallContext));
locSerializer.Put('AValue', TypeInfo(RecordA), AValue);
locSerializer.EndCall();
MakeCall();
locSerializer.BeginCallRead((Self as ICallContext));
strPrmName := 'Result';
locSerializer.Get(TypeInfo(RecordB), strPrmName, Result);
Finally
locSerializer.Clear();
End;
End;
function TRecordService_Proxy.AddRec(
const AA : RecordA;
const AB : RecordB;
const AC : RecordC
):RecordC;
Var
locSerializer : IFormatterClient;
strPrmName : string;
Begin
locSerializer := GetSerializer();
Try
locSerializer.BeginCall('AddRec', GetTarget(),(Self as ICallContext));
locSerializer.Put('AA', TypeInfo(RecordA), AA);
locSerializer.Put('AB', TypeInfo(RecordB), AB);
locSerializer.Put('AC', TypeInfo(RecordC), AC);
locSerializer.EndCall();
MakeCall();
locSerializer.BeginCallRead((Self as ICallContext));
strPrmName := 'Result';
locSerializer.Get(TypeInfo(RecordC), strPrmName, Result);
Finally
locSerializer.Clear();
End;
End;
initialization
{$i record_sample.wst}
{$IF DECLARED(Register_record_sample_ServiceMetadata)}
Register_record_sample_ServiceMetadata();
{$IFEND}
End.

View 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"..\..\..\;..\..\;..\;..\..\..\..\"
-O"..\..\..\;..\..\;..\;..\..\..\..\"
-I"..\..\..\;..\..\;..\;..\..\..\..\"
-R"..\..\..\;..\..\;..\;..\..\..\..\"
-DINDY_9
-w-UNSAFE_TYPE
-w-UNSAFE_CODE
-w-UNSAFE_CAST

View 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=..\..\..\;..\..\;..\;..\..\..\..\
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=..\..\..\;..\..\;..\;..\..\..\..\
Item1=$(DELPHI)\Lib\Debug;C:\PROGRA~1\Borland\Delphi7\MyTools\JVCL\3.20\jcl\lib\d7\debug;..\..\..\;..\..\;..\;..\..\..\..\
Item2=..\..\..\;..\..\;..\
Item3=..\
[HistoryLists\hlUnitOutputDirectory]
Count=1
Item0=obj

View File

@ -0,0 +1,44 @@
program record_server;
{$APPTYPE CONSOLE}
uses
delphi_init_com, Classes, SysUtils,
indy_http_server,
metadata_service,
server_listener,
server_service_soap,
server_binary_formatter,
server_service_xmlrpc,
config_objects,
record_sample,
record_sample_binder,
record_sample_imp,
record_rtti;
var
AppObject : TwstListener;
begin
Server_service_RegisterBinaryFormat();
Server_service_RegisterSoapFormat();
Server_service_RegisterXmlRpcFormat();
RegisterRecordServiceImplementationFactory();
Server_service_RegisterRecordServiceService();
//wst_CreateDefaultFile(wst_GetConfigFileName(),nil);
AppObject := TwstIndyHttpListener.Create('127.0.0.1',20000);
try
WriteLn('"Web Service Toolkit" HTTP Server sample listening at:');
WriteLn('');
WriteLn('http://127.0.0.1:20000/');
WriteLn('');
WriteLn('Press enter to quit.');
AppObject.Start();
ReadLn;
finally
FreeAndNil(AppObject);
end;
end.

View File

@ -0,0 +1,240 @@
<?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="18">
<Unit0>
<Filename Value="record_server.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="record_server"/>
<CursorPos X="61" Y="27"/>
<TopLine Value="7"/>
<EditorIndex Value="0"/>
<UsageCount Value="37"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="..\..\..\indy_http_server.pas"/>
<UnitName Value="indy_http_server"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="12"/>
</Unit1>
<Unit2>
<Filename Value="..\..\..\wst_fpc_xml.pas"/>
<UnitName Value="wst_fpc_xml"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="13"/>
</Unit2>
<Unit3>
<Filename Value="..\record_sample_binder.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="record_sample_binder"/>
<CursorPos X="47" Y="68"/>
<TopLine Value="50"/>
<EditorIndex Value="7"/>
<UsageCount Value="26"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="..\record_sample.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="record_sample"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="26"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="..\record_sample_proxy.pas"/>
<UnitName Value="record_sample_proxy"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="12"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="..\record_sample_imp.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="record_sample_imp"/>
<CursorPos X="52" Y="20"/>
<TopLine Value="1"/>
<EditorIndex Value="8"/>
<UsageCount Value="26"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="..\..\..\base_service_intf.pas"/>
<UnitName Value="base_service_intf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="10"/>
<UsageCount Value="19"/>
<Bookmarks Count="1">
<Item0 X="3" Y="362" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="..\..\..\record_rtti.pas"/>
<UnitName Value="record_rtti"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="11"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
<Filename Value="..\..\..\server_service_soap.pas"/>
<UnitName Value="server_service_soap"/>
<CursorPos X="15" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="1"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="..\..\..\base_soap_formatter.pas"/>
<UnitName Value="base_soap_formatter"/>
<CursorPos X="21" Y="21"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstrh.inc"/>
<CursorPos X="55" Y="89"/>
<TopLine Value="60"/>
<UsageCount Value="9"/>
</Unit11>
<Unit12>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpash.inc"/>
<CursorPos X="8" Y="75"/>
<TopLine Value="282"/>
<UsageCount Value="9"/>
</Unit12>
<Unit13>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
<UnitName Value="typinfo"/>
<CursorPos X="56" Y="39"/>
<TopLine Value="200"/>
<UsageCount Value="10"/>
</Unit13>
<Unit14>
<Filename Value="..\..\..\wst_global.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="..\..\..\wst_types.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_types"/>
<CursorPos X="14" Y="18"/>
<TopLine Value="10"/>
<EditorIndex Value="4"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit15>
<Unit16>
<Filename Value="..\..\..\wst.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="..\..\..\wst_delphi.inc"/>
<CursorPos X="13" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit17>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
<OtherUnitFiles Value="..\;..\..\;..\..\..\;..\..\..\wst_rtti_filter\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Core\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Protocols\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\System\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
<UnitOutputDirectory Value="obj"/>
<SrcPath Value="$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Core\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Protocols\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\System\;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CustomOptions Value="-dINDY_10
-dUseCThreads
"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="4">
<Item1>
<Source Value="..\..\..\metadata_wsdl.pas"/>
<Line Value="459"/>
</Item1>
<Item2>
<Source Value="..\..\..\metadata_wsdl.pas"/>
<Line Value="468"/>
</Item2>
<Item3>
<Source Value="..\..\..\metadata_wsdl.pas"/>
<Line Value="431"/>
</Item3>
<Item4>
<Source Value="..\..\..\server_service_intf.pas"/>
<Line Value="630"/>
</Item4>
</BreakPoints>
<Exceptions Count="2">
<Item1>
<Name Value="ECodetoolError"/>
</Item1>
<Item2>
<Name Value="EFOpenError"/>
</Item2>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,40 @@
program record_server;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils,
indy_http_server, metadata_service, server_listener,
server_service_soap, server_binary_formatter, server_service_xmlrpc, config_objects,
record_sample, record_sample_binder, record_sample_imp, record_rtti;
var
AppObject : TwstListener;
begin
Server_service_RegisterBinaryFormat();
Server_service_RegisterSoapFormat();
Server_service_RegisterXmlRpcFormat();
RegisterRecordServiceImplementationFactory();
Server_service_RegisterRecordServiceService();
//wst_CreateDefaultFile(wst_GetConfigFileName(),nil);
AppObject := TwstIndyHttpListener.Create('127.0.0.1',20000);
try
WriteLn('"Web Service Toolkit" HTTP Server sample listening at:');
WriteLn('');
WriteLn('http://127.0.0.1:20000/');
WriteLn('');
WriteLn('Press enter to quit.');
AppObject.Start();
ReadLn();
finally
FreeAndNil(AppObject);
end;
end.

View File

@ -0,0 +1,305 @@
<?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"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="2"/>
</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="12">
<Unit0>
<Filename Value="test_record.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="test_record"/>
<CursorPos X="31" Y="37"/>
<TopLine Value="17"/>
<EditorIndex Value="0"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\win\sysutils.pp"/>
<UnitName Value="sysutils"/>
<CursorPos X="10" Y="33"/>
<TopLine Value="49"/>
<EditorIndex Value="9"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysutilh.inc"/>
<CursorPos X="11" Y="236"/>
<TopLine Value="210"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\intfh.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="4"/>
<UsageCount Value="10"/>
</Unit3>
<Unit4>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
<UnitName Value="typinfo"/>
<CursorPos X="7" Y="75"/>
<TopLine Value="60"/>
<EditorIndex Value="8"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\rtti.inc"/>
<CursorPos X="3" Y="132"/>
<TopLine Value="43"/>
<EditorIndex Value="2"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="..\record_rtti.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="record_rtti"/>
<CursorPos X="13" Y="28"/>
<TopLine Value="7"/>
<EditorIndex Value="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\system.inc"/>
<CursorPos X="20" Y="244"/>
<TopLine Value="222"/>
<EditorIndex Value="4"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\systemh.inc"/>
<CursorPos X="11" Y="865"/>
<TopLine Value="845"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\win\systhrd.inc"/>
<CursorPos X="14" Y="137"/>
<TopLine Value="137"/>
<EditorIndex Value="7"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\aliases.inc"/>
<CursorPos X="11" Y="31"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\compproc.inc"/>
<CursorPos X="32" Y="408"/>
<TopLine Value="391"/>
<EditorIndex Value="6"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit11>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="101" Column="1" TopLine="77"/>
</Position1>
<Position2>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="95" Column="1" TopLine="77"/>
</Position2>
<Position3>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="96" Column="1" TopLine="77"/>
</Position3>
<Position4>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="97" Column="1" TopLine="77"/>
</Position4>
<Position5>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="98" Column="1" TopLine="77"/>
</Position5>
<Position6>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="99" Column="1" TopLine="77"/>
</Position6>
<Position7>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="100" Column="1" TopLine="77"/>
</Position7>
<Position8>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="101" Column="1" TopLine="77"/>
</Position8>
<Position9>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="103" Column="1" TopLine="77"/>
</Position9>
<Position10>
<Filename Value="test_record.pas"/>
<Caret Line="43" Column="1" TopLine="17"/>
</Position10>
<Position11>
<Filename Value="test_record.pas"/>
<Caret Line="22" Column="1" TopLine="7"/>
</Position11>
<Position12>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="103" Column="22" TopLine="77"/>
</Position12>
<Position13>
<Filename Value="test_record.pas"/>
<Caret Line="42" Column="1" TopLine="17"/>
</Position13>
<Position14>
<Filename Value="test_record.pas"/>
<Caret Line="32" Column="50" TopLine="17"/>
</Position14>
<Position15>
<Filename Value="test_record.pas"/>
<Caret Line="31" Column="50" TopLine="17"/>
</Position15>
<Position16>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="15" Column="24" TopLine="1"/>
</Position16>
<Position17>
<Filename Value="test_record.pas"/>
<Caret Line="27" Column="29" TopLine="17"/>
</Position17>
<Position18>
<Filename Value="test_record.pas"/>
<Caret Line="42" Column="1" TopLine="17"/>
</Position18>
<Position19>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="97" Column="29" TopLine="78"/>
</Position19>
<Position20>
<Filename Value="test_record.pas"/>
<Caret Line="42" Column="1" TopLine="17"/>
</Position20>
<Position21>
<Filename Value="test_record.pas"/>
<Caret Line="33" Column="1" TopLine="17"/>
</Position21>
<Position22>
<Filename Value="test_record.pas"/>
<Caret Line="42" Column="1" TopLine="17"/>
</Position22>
<Position23>
<Filename Value="test_record.pas"/>
<Caret Line="33" Column="55" TopLine="17"/>
</Position23>
<Position24>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\rtti.inc"/>
<Caret Line="139" Column="38" TopLine="130"/>
</Position24>
<Position25>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\system.inc"/>
<Caret Line="244" Column="20" TopLine="222"/>
</Position25>
<Position26>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\systemh.inc"/>
<Caret Line="739" Column="10" TopLine="651"/>
</Position26>
<Position27>
<Filename Value="..\..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\systemh.inc"/>
<Caret Line="865" Column="11" TopLine="845"/>
</Position27>
<Position28>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="97" Column="44" TopLine="78"/>
</Position28>
<Position29>
<Filename Value="test_record.pas"/>
<Caret Line="42" Column="24" TopLine="17"/>
</Position29>
<Position30>
<Filename Value="..\record_rtti.pas"/>
<Caret Line="40" Column="73" TopLine="40"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="C:\Programmes\lazarus\wst\trunk\tests\record\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="4">
<Item1>
<Source Value="..\..\..\samples\http_server\D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="230"/>
</Item1>
<Item2>
<Source Value="..\..\..\samples\http_server\D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
<Line Value="193"/>
</Item2>
<Item3>
<Source Value="..\..\..\samples\http_server\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>

View File

@ -0,0 +1,47 @@
program test_record;
{$mode objfpc}{$H+}
uses
Classes, SysUtils
,TypInfo, record_rtti;
type
TSampleRecord = record
fieldA : Integer;
fieldB : Single;
end;
procedure PrintRecType(ARecTyp : PRecordTypeData);
var
i : Integer;
f : TRecordFieldInfo;
begin
Assert(Assigned(ARecTyp));
WriteLn('');
WriteLn('Type name = ', ARecTyp^.Name);
WriteLn(' RecordSize = ', ARecTyp^.RecordSize);
WriteLn(' FieldCount = ', ARecTyp^.FieldCount);
for i := 1 to ARecTyp^.FieldCount do begin
f := ARecTyp^.Fields[i-1];
WriteLn(' Field[',i,']');
WriteLn(' Name = ',f.Name);
WriteLn(' Offset = ',f.Offset);
WriteLn(' TypeInfo = ',PtrUInt(f.TypeInfo));
if ( f.TypeInfo <> nil ) then begin
WriteLn(' TypeInfo^.Name = ',f.TypeInfo^^.Name);
end;
end;
WriteLn('');
end;
var
recTyp : PRecordTypeData;
begin
recTyp := MakeRecordTypeInfo(TypeInfo(TSampleRecord));
PrintRecType(recTyp);
FreeRecordTypeInfo(recTyp);
ReadLn;
end.

View File

@ -15,7 +15,7 @@
-$O+
-$P+
-$Q-
-$R-
-$R+
-$S-
-$T-
-$U-

View File

@ -18,7 +18,7 @@ N=1
O=1
P=1
Q=0
R=0
R=1
S=0
T=0
U=0

View File

@ -0,0 +1,39 @@
{$DEFINE HAS_QWORD}
{$DEFINE HAS_COMP}
unit simple_record_test;
interface
type
TTestSmallRecord = record
fieldSmallint : Smallint;
fieldWord : Word;
fieldString : string;
end;
TTestRecord = record
fieldByte : Byte;
fieldShortInt : ShortInt;
fieldSmallint : Smallint;
fieldWord : Word;
fieldInteget : Integer;
fieldLongWord : LongWord;
fieldInt64 : Int64;
{$IFDEF HAS_QWORD}
fieldQWord : QWord;
{$ENDIF}
{$IFDEF HAS_COMP}
fieldComp : Comp;
{$ENDIF}
fieldSingle : Single;
fieldDouble : Double;
fieldExtended : Extended;
fieldCurrency : Currency;
fieldBoolean : Boolean;
fieldString : string;
fieldRecord : TTestSmallRecord;
end;
implementation
end.

View File

@ -13,9 +13,6 @@ uses
TypInfo,
base_service_intf, server_service_intf;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
type
ITest = interface
@ -37,6 +34,34 @@ type
constructor Create();override;
end;
ISimple_A = interface
['{D015AD95-6062-4650-9B00-CF3004E9CA1A}']//['{4793180A-DAA4-4E50-9194-5EEEE851EBE3}']
end;
ISimple_B = interface
['{4793180A-DAA4-4E50-9194-5EEEE851EBE3}']
end;
TSimpleFactoryItem_A = class(TSimpleFactoryItem,IInterface,ISimple_A)
end;
TSimpleFactoryItem_B = class(TSimpleFactoryItem,IInterface,ISimple_B)
end;
{ TTest_TIntfPoolItem }
TTest_TIntfPoolItem = class(TTestCase)
published
procedure All();
end;
{ TTest_TSimpleItemFactory }
TTest_TSimpleItemFactory = class(TTestCase)
published
procedure CreateProc();
procedure CreateInstance();
end;
{ TTest_TIntfPool }
@ -447,15 +472,121 @@ begin
Check(oldElt <> elt,'4.2');
end;
{ TTest_TIntfPoolItem }
procedure TTest_TIntfPoolItem.All();
var
i : IInterface;
b : Boolean;
a : TIntfPoolItem;
begin
i := nil;
b := False;
a := TIntfPoolItem.Create(i,b);
try
Check(( i = a.Intf ),'Create() > Intf');
CheckEquals(b,a.Used,'Create() > Used');
b := not b;
a.Used := b;
CheckEquals(b,a.Used,'Used');
finally
FreeAndNil(a);
end;
a := nil;
i := nil;
b := True;
a := TIntfPoolItem.Create(i,b);
try
Check(( i = a.Intf ),'Create() > Intf');
CheckEquals(b,a.Used,'Create() > Used');
b := not b;
a.Used := b;
CheckEquals(b,a.Used,'Used');
finally
FreeAndNil(a);
end;
end;
{ TTest_TSimpleItemFactory }
procedure TTest_TSimpleItemFactory.CreateInstance();
var
b, a : IItemFactory;
itm : IInterface;
begin
a := TSimpleItemFactory.Create(TSimpleFactoryItem_A);
itm := a.CreateInstance();
CheckEquals(True,Assigned(itm));
CheckEquals(True,Supports(itm,ISimple_A));
itm := a.CreateInstance();
CheckEquals(True,Assigned(itm));
CheckEquals(True,Supports(itm,ISimple_A));
b := TSimpleItemFactory.Create(TSimpleFactoryItem_B);
itm := b.CreateInstance();
CheckEquals(True,Assigned(itm));
CheckEquals(True,Supports(itm,ISimple_B));
itm := b.CreateInstance();
CheckEquals(True,Assigned(itm));
CheckEquals(True,Supports(itm,ISimple_B));
end;
type
{ TSimpleItemFactoryCrack }
TSimpleItemFactoryCrack = class(TSimpleItemFactory)
public
function GetItemClass() : TSimpleFactoryItemClass;
end;
{ TSimpleItemFactoryCrack }
function TSimpleItemFactoryCrack.GetItemClass() : TSimpleFactoryItemClass;
begin
Result := inherited GetItemClass();
end;
procedure TTest_TSimpleItemFactory.CreateProc();
var
a : IItemFactory;
b : TSimpleItemFactoryCrack;
ok : Boolean;
begin
ok := False;
try
TSimpleItemFactory.Create(nil);
except
on e : EServiceConfigException do begin
ok := True;
end;
end;
CheckEquals(True,ok,'Create(nil)');
b := TSimpleItemFactoryCrack.Create(TSimpleFactoryItem_A);
CheckEquals(TSimpleFactoryItem_A,b.GetItemClass());
FreeAndNil(b);
b := TSimpleItemFactoryCrack.Create(TSimpleFactoryItem_B);
CheckEquals(TSimpleFactoryItem_B,b.GetItemClass());
end;
initialization
{$IFDEF FPC}
RegisterTest(TTest_TIntfPool);
RegisterTest(TTest_TSimpleItemFactoryEx);
RegisterTest(TTest_TImplementationFactory);
RegisterTest(TTest_TIntfPoolItem);
RegisterTest(TTest_TImplementationFactory);
{$ELSE}
RegisterTest(TTest_TIntfPool.Suite);
RegisterTest(TTest_TSimpleItemFactoryEx.Suite);
RegisterTest(TTest_TImplementationFactory.Suite);
RegisterTest(TTest_TIntfPoolItem.Suite);
RegisterTest(TTest_TImplementationFactory.Suite);
{$ENDIF}
end.

View File

@ -19,14 +19,12 @@ uses
Classes, SysUtils,
{$IFDEF FPC}
fpcunit, testutils, testregistry,
{$ELSE}
TestFrameWork,
{$ENDIF}
{$IFNDEF FPC}
TestFrameWork, ActiveX,
{$ENDIF}
TypInfo,
base_service_intf;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
base_service_intf, wst_types, server_service_intf, service_intf;
type
@ -285,6 +283,31 @@ type
TEmbeddedArrayOfStringRemotable = class(TArrayOfStringRemotable);
TTestSmallRecord = record
fieldSmallint : Smallint;
fieldWord : Word;
fieldString : string;
end;
TTestRecord = record
fieldByte : Byte;
fieldShortInt : ShortInt;
fieldSmallint : Smallint;
fieldWord : Word;
fieldInteger : Integer;
fieldLongWord : LongWord;
fieldInt64 : Int64;
fieldQWord : QWord;
fieldComp : Comp;
fieldSingle : Single;
fieldDouble : Double;
fieldExtended : Extended;
fieldCurrency : Currency;
fieldBoolean : Boolean;
fieldString : string;
fieldRecord : TTestSmallRecord;
end;
{ TTestFormatterSimpleType }
TTestFormatterSimpleType= class(TTestCase)
@ -352,6 +375,9 @@ type
procedure Test_FloatCurrencyArray();
procedure Test_ComplexInt32S();
procedure Test_Record_simple();
procedure Test_Record_nested();
end;
{ TTestBinaryFormatter }
@ -452,8 +478,43 @@ type
procedure ParseDate();
end;
{ TTest_SoapFormatterExceptionBlock }
TTest_SoapFormatterExceptionBlock = class(TTestCase)
protected
procedure SetUp(); override;
procedure TearDown(); override;
function CreateFormatter():IFormatterResponse;
function CreateFormatterClient():IFormatterClient;
published
procedure ExceptBlock_server();
procedure ExceptBlock_client();
end;
{ TTest_XmlRpcFormatterExceptionBlock }
TTest_XmlRpcFormatterExceptionBlock = class(TTestCase)
protected
procedure SetUp(); override;
procedure TearDown(); override;
function CreateFormatter():IFormatterResponse;
function CreateFormatterClient():IFormatterClient;
published
procedure ExceptBlock_server();
procedure ExceptBlock_client();
end;
implementation
uses base_binary_formatter, base_soap_formatter, base_xmlrpc_formatter;
uses base_binary_formatter, base_soap_formatter, base_xmlrpc_formatter, record_rtti,
Math, imp_utils
{$IFNDEF FPC}
, xmldom, wst_delphi_xml
{$ENDIF}
{$IFDEF FPC}
, DOM, XMLRead, wst_fpc_xml
{$ENDIF}
, server_service_soap, soap_formatter,
server_service_xmlrpc, xmlrpc_formatter;
function TTestFormatterSimpleType.Support_ComplextType_with_SimpleContent( ): Boolean;
begin
@ -2502,6 +2563,139 @@ begin
end;
end;
procedure TTestFormatter.Test_Record_simple();
const VAL_1 : Integer = 12; VAL_2 : Integer = -76; VAL_3 = 'wst record sample';
var
f : IFormatterBase;
s : TMemoryStream;
x : string;
a : TTestSmallRecord;
begin
s := nil;
try
a.fieldWord := VAL_1;
a.fieldSmallint := VAL_2;
a.fieldString := VAL_3;
f := CreateFormatter(TypeInfo(TClass_Int));
f.BeginObject('Root',TypeInfo(TClass_Int));
f.Put('a',TypeInfo(TTestSmallRecord),a);
f.EndScope();
a.fieldWord := 0;
a.fieldSmallint := 0;
a.fieldString := '';
s := TMemoryStream.Create();
f.SaveToStream(s); s.SaveToFile(ClassName + '.Test_Record_simple.xml');
f := CreateFormatter(TypeInfo(TClass_Int));
s.Position := 0;
f.LoadFromStream(s);
x := 'Root';
f.BeginObjectRead(x,TypeInfo(TClass_Int));
x := 'a';
f.Get(TypeInfo(TTestSmallRecord),x,a);
f.EndScopeRead();
CheckEquals(VAL_1,a.fieldWord);
CheckEquals(VAL_2,a.fieldSmallint);
CheckEquals(VAL_3,a.fieldString);
finally
s.Free();
end;
end;
procedure TTestFormatter.Test_Record_nested();
const
VAL_EPSILON = 0.0001;
VAL_EMPTY_RECORD : TTestRecord = (
fieldByte : 0;
fieldShortInt : 0;
fieldSmallint : 0;
fieldWord : 0;
fieldInteger : 0;
fieldLongWord : 0;
fieldInt64 : 0;
fieldQWord : 0;
fieldComp : 0;
fieldSingle : 0;
fieldDouble : 0;
fieldExtended : 0;
fieldCurrency : 0;
fieldBoolean : False;
fieldString : '';
fieldRecord : ( fieldSmallint : 0; fieldWord : 0; fieldString : '');
);
VAL_RECORD : TTestRecord = (
fieldByte : 12;
fieldShortInt : -10;
fieldSmallint : 76;
fieldWord : 34;
fieldInteger : -45;
fieldLongWord : 567;
fieldInt64 : 8910;
fieldQWord : 111213;
fieldComp : 141516;
fieldSingle : 1718;
fieldDouble : -1819;
fieldExtended : 2021;
fieldCurrency : -2122;
fieldBoolean : True;
fieldString : 'sample record string 0123456789';
fieldRecord : ( fieldSmallint : 10; fieldWord : 11; fieldString : 'azertyqwerty');
);
var
f : IFormatterBase;
s : TMemoryStream;
x : string;
a : TTestRecord;
begin
s := nil;
try
a := VAL_RECORD;
f := CreateFormatter(TypeInfo(TClass_Int));
f.BeginObject('Root',TypeInfo(TClass_Int));
f.Put('a',TypeInfo(TTestRecord),a);
f.EndScope();
a := VAL_EMPTY_RECORD;
s := TMemoryStream.Create();
f.SaveToStream(s); s.SaveToFile(ClassName + '.Test_Record_nested.xml');
f := CreateFormatter(TypeInfo(TClass_Int));
s.Position := 0;
f.LoadFromStream(s);
x := 'Root';
f.BeginObjectRead(x,TypeInfo(TClass_Int));
x := 'a';
f.Get(TypeInfo(TTestRecord),x,a);
f.EndScopeRead();
CheckEquals(VAL_RECORD.fieldBoolean,a.fieldBoolean,'fieldBoolean');
CheckEquals(VAL_RECORD.fieldByte,a.fieldByte,'fieldByte');
{$IFDEF HAS_COMP}
CheckEquals(VAL_RECORD.fieldComp,a.fieldComp,'fieldComp');
{$ENDIF}
Check(IsZero(VAL_RECORD.fieldCurrency-a.fieldCurrency,VAL_EPSILON),'fieldCurrency');
Check(IsZero(VAL_RECORD.fieldExtended-a.fieldExtended,VAL_EPSILON),'fieldExtended');
CheckEquals(VAL_RECORD.fieldInt64,a.fieldInt64,'fieldInt64');
CheckEquals(VAL_RECORD.fieldInteger,a.fieldInteger,'fieldInteger');
Check(VAL_RECORD.fieldLongWord = a.fieldLongWord,'fieldLongWord');
{$IFDEF HAS_QWORD}
CheckEquals(VAL_RECORD.fieldQWord,a.fieldQWord,'fieldQWord');
{$ENDIF}
CheckEquals(VAL_RECORD.fieldRecord.fieldSmallint,a.fieldRecord.fieldSmallint,'fieldSmallint');
CheckEquals(VAL_RECORD.fieldRecord.fieldString,a.fieldRecord.fieldString,'fieldString');
CheckEquals(VAL_RECORD.fieldRecord.fieldWord,a.fieldRecord.fieldWord,'fieldWord');
CheckEquals(VAL_RECORD.fieldShortInt,a.fieldShortInt,'fieldShortInt');
Check(IsZero(VAL_RECORD.fieldSingle-a.fieldSingle,VAL_EPSILON),'fieldSingle');
CheckEquals(VAL_RECORD.fieldSmallint,a.fieldSmallint,'fieldSmallint');
CheckEquals(VAL_RECORD.fieldString,a.fieldString,'fieldString');
CheckEquals(VAL_RECORD.fieldWord,a.fieldWord,'fieldWord');
finally
s.Free();
end;
end;
{ TTestBinaryFormatter }
@ -3151,6 +3345,386 @@ begin
Result := False;
end;
{ TTest_SoapFormatterExceptionBlock }
function TTest_SoapFormatterExceptionBlock.CreateFormatter() : IFormatterResponse;
begin
Result := server_service_soap.TSOAPFormatter.Create() as IFormatterResponse;
end;
function TTest_SoapFormatterExceptionBlock.CreateFormatterClient() : IFormatterClient;
begin
Result := soap_formatter.TSOAPFormatter.Create() as IFormatterClient;
end;
function FindAttributeByValueInNode(
const AAttValue : string;
const ANode : TDOMNode;
out AResAtt : string
):boolean;
Var
i,c : Integer;
begin
AResAtt := '';
if Assigned(ANode) and
Assigned(ANode.Attributes) and
( ANode.Attributes.Length > 0 )
then begin
c := Pred(ANode.Attributes.Length);
For i := 0 To c Do Begin
If AnsiSameText(AAttValue,ANode.Attributes.Item[i].NodeValue) Then Begin
AResAtt := ANode.Attributes.Item[i].NodeName;
Result := True;
Exit;
End;
End;
end;
Result := False;
end;
procedure TTest_SoapFormatterExceptionBlock.ExceptBlock_server();
const
VAL_CODE = 'Server.CustomCode.Test'; VAL_MSG = 'This is a sample exception message.';
var
f : IFormatterResponse;
strm : TMemoryStream;
envNd : TDOMElement;
bdyNd, fltNd, hdrNd, tmpNode : TDOMNode;
nsShortName,eltName, msgBuff : string;
doc : TXMLDocument;
begin
f := CreateFormatter();
f.BeginExceptionList(VAL_CODE,VAL_MSG);
f.EndExceptionList();
strm := TMemoryStream.Create();
try
f.SaveToStream(strm);strm.SaveToFile('TTest_SoapFormatterExceptionBlock.ExceptBlock.xml');
strm.Position := 0;
ReadXMLFile(doc,strm);
if FindAttributeByValueInNode(sSOAP_ENV,doc.DocumentElement,nsShortName) or
FindAttributeByValueInNode('"' + sSOAP_ENV + '"',doc.DocumentElement,nsShortName)
then begin
nsShortName := Copy(nsShortName,1 + Pos(':',nsShortName),MaxInt);
if not IsStrEmpty(nsShortName) then
nsShortName := nsShortName + ':';
end else begin
nsShortName := '';
end;
eltName := nsShortName + sENVELOPE;
envNd := doc.DocumentElement;
if not SameText(eltName,envNd.NodeName) then
check(False,Format('XML root node must be "Envelope", found : "%s"',[envNd.NodeName + ':::' + nsShortName]));
bdyNd := envNd.FirstChild;
if not Assigned(bdyNd) then
check(False,'Node not found : "Body".');
eltName := nsShortName + 'Body';
if not SameText(bdyNd.NodeName,eltName) then begin
check(False,'Node not found : "Body".');
end;
bdyNd := envNd.FirstChild;
If Not Assigned(bdyNd) Then
check(False,'Node not found : "Body"');
If Not SameText(bdyNd.NodeName,eltName) Then
bdyNd := bdyNd.NextSibling;
If Not Assigned(bdyNd) Then
Check(False,'Node not found : "Body"');
If Not Assigned(bdyNd.FirstChild) Then
Check(False,'Response Node not found');
eltName := nsShortName + 'Fault';
if SameText(eltName,bdyNd.FirstChild.NodeName) then begin
fltNd := bdyNd.FirstChild;
eltName := 'faultcode';
tmpNode := FindNode(fltNd,eltName);
if not Assigned(tmpNode) then
Check(False,Format('"%s" Node not found.',[eltName]));
if tmpNode.HasChildNodes then
msgBuff := tmpNode.FirstChild.NodeValue
else
msgBuff := tmpNode.NodeValue;
CheckEquals(VAL_CODE,msgBuff,eltName);
eltName := 'faultstring';
tmpNode := FindNode(fltNd,eltName);
if not Assigned(tmpNode) then
Check(False,Format('"%s" Node not found.',[eltName]));
if tmpNode.HasChildNodes then
msgBuff := tmpNode.FirstChild.NodeValue
else
msgBuff := tmpNode.NodeValue;
CheckEquals(VAL_MSG,msgBuff,eltName);
end;
finally
FreeAndNil(strm);
end;
end;
procedure TTest_SoapFormatterExceptionBlock.ExceptBlock_client();
const
VAL_CODE = 'Server.CustomCode.Test'; VAL_MSG = 'This is a sample exception message.';
VAL_STREAM =
'<?xml version="1.0"?> '+
' <SOAP-ENV:Envelope ' +
' xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' +
' xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" ' +
' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> ' +
' <SOAP-ENV:Body> '+
' <SOAP-ENV:Fault> '+
' <faultcode>' + VAL_CODE + '</faultcode> '+
' <faultstring>' + VAL_MSG +'</faultstring> '+
' </SOAP-ENV:Fault> '+
' </SOAP-ENV:Body> '+
' </SOAP-ENV:Envelope>';
var
f : IFormatterClient;
strm : TStringStream;
excpt_code, excpt_msg : string;
begin
excpt_code := '';
excpt_msg := '';
f := CreateFormatterClient();
strm := TStringStream.Create(VAL_STREAM);
try
strm.Position := 0;
f.LoadFromStream(strm);
try
f.BeginCallRead(nil);
Check(False,'BeginCallRead() should raise an exception.');
except
on e : ESOAPException do begin
excpt_code := e.FaultCode;
excpt_msg := e.FaultString;
end;
end;
CheckEquals(VAL_CODE,excpt_code,'faultCode');
CheckEquals(VAL_MSG,excpt_msg,'faultString');
finally
FreeAndNil(strm);
end;
end;
{$IFDEF WST_RECORD_RTTI}
function __TTestSmallRecord_TYPEINFO_FUNC__() : PTypeInfo;
var
p : ^TTestSmallRecord;
r : TTestSmallRecord;
begin
p := @r;
Result := MakeRawTypeInfo(
'TTestSmallRecord',
SizeOf(TTestSmallRecord),
[ PtrUInt(@(p^.fieldSmallint)) - PtrUInt(p), PtrUInt(@(p^.fieldWord)) - PtrUInt(p), PtrUInt(@(p^.fieldString)) - PtrUInt(p) ],
[ TypeInfo(SmallInt), TypeInfo(Word), TypeInfo(String) ]
);
end;
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
function __TTestRecord_TYPEINFO_FUNC__() : PTypeInfo;
var
p : ^TTestRecord;
r : TTestRecord;
begin
p := @r;
Result := MakeRawTypeInfo(
'TTestRecord',
SizeOf(TTestRecord),
[ PtrUInt(@(p^.fieldByte)) - PtrUInt(p), PtrUInt(@(p^.fieldShortInt)) - PtrUInt(p), PtrUInt(@(p^.fieldSmallint)) - PtrUInt(p), PtrUInt(@(p^.fieldWord)) - PtrUInt(p), PtrUInt(@(p^.fieldInteger)) - PtrUInt(p), PtrUInt(@(p^.fieldLongWord)) - PtrUInt(p), PtrUInt(@(p^.fieldInt64)) - PtrUInt(p), PtrUInt(@(p^.fieldQWord)) - PtrUInt(p), PtrUInt(@(p^.fieldComp)) - PtrUInt(p), PtrUInt(@(p^.fieldSingle)) - PtrUInt(p), PtrUInt(@(p^.fieldDouble)) - PtrUInt(p), PtrUInt(@(p^.fieldExtended)) - PtrUInt(p), PtrUInt(@(p^.fieldCurrency)) - PtrUInt(p), PtrUInt(@(p^.fieldBoolean)) - PtrUInt(p), PtrUInt(@(p^.fieldString)) - PtrUInt(p), PtrUInt(@(p^.fieldRecord)) - PtrUInt(p) ],
[ TypeInfo(Byte), TypeInfo(ShortInt), TypeInfo(SmallInt), TypeInfo(Word), TypeInfo(Integer), TypeInfo(LongWord), TypeInfo(Int64), TypeInfo(QWord), TypeInfo(Comp), TypeInfo(Single), TypeInfo(Double), TypeInfo(Extended), TypeInfo(Currency), TypeInfo(Boolean), TypeInfo(String), TypeInfo(TTestSmallRecord) ]
);
end;
{$ENDIF WST_RECORD_RTTI}
procedure TTest_SoapFormatterExceptionBlock.SetUp();
begin
inherited;
{$IFNDEF FPC}
CoInitialize(nil);
{$ENDIF}
end;
procedure TTest_SoapFormatterExceptionBlock.TearDown();
begin
{$IFNDEF FPC}
CoUninitialize();
{$ENDIF}
inherited;
end;
{ TTest_XmlRpcFormatterExceptionBlock }
procedure TTest_XmlRpcFormatterExceptionBlock.SetUp();
begin
inherited;
{$IFNDEF FPC}
CoInitialize(nil);
{$ENDIF}
end;
procedure TTest_XmlRpcFormatterExceptionBlock.TearDown();
begin
{$IFNDEF FPC}
CoUninitialize();
{$ENDIF}
inherited;
end;
function TTest_XmlRpcFormatterExceptionBlock.CreateFormatter() : IFormatterResponse;
begin
Result := server_service_xmlrpc.TXmlRpcFormatter.Create() as IFormatterResponse;
end;
function TTest_XmlRpcFormatterExceptionBlock.CreateFormatterClient() : IFormatterClient;
begin
Result := xmlrpc_formatter.TXmlRpcFormatter.Create() as IFormatterClient;
end;
procedure TTest_XmlRpcFormatterExceptionBlock.ExceptBlock_server();
function loc_FindNode(AScope : TDOMNode; const ANodeName: string): TDOMNode;
var
memberNode, tmpNode : TDOMNode;
i : Integer;
chilNodes : TDOMNodeList;
nodeFound : Boolean;
begin
Result := nil;
if AScope.HasChildNodes() then begin
nodeFound := False;
memberNode := AScope.FirstChild;
while ( not nodeFound ) and ( memberNode <> nil ) do begin
if memberNode.HasChildNodes() then begin
chilNodes := memberNode.ChildNodes;
for i := 0 to Pred(GetNodeListCount(chilNodes)) do begin
tmpNode := chilNodes.Item[i];
if AnsiSameText(sNAME,tmpNode.NodeName) and
( tmpNode.FirstChild <> nil ) and
AnsiSameText(ANodeName,tmpNode.FirstChild.NodeValue)
then begin
nodeFound := True;
Break;
end;
end;
if nodeFound then begin
tmpNode := FindNode(memberNode,sVALUE);
if ( tmpNode <> nil ) and ( tmpNode.FirstChild <> nil ) then begin
Result := tmpNode.FirstChild;
Break;
end;
end;
end;
memberNode := memberNode.NextSibling;
end;
end;
end;
const VAL_CODE = '1210'; VAL_MSG = 'This is a sample exception message.';
var
f : IFormatterResponse;
strm : TMemoryStream;
callNode : TDOMElement;
faultNode, faultStruct, tmpNode : TDOMNode;
doc : TXMLDocument;
eltName : string;
excpt_Obj : EXmlRpcException;
excpt_code, excpt_msg : string;
begin
f := CreateFormatter();
f.BeginExceptionList(VAL_CODE,VAL_MSG);
f.EndExceptionList();
strm := TMemoryStream.Create();
try
f.SaveToStream(strm);strm.SaveToFile('TTest_XmlRpcFormatterExceptionBlock.ExceptBlock.xml');
strm.Position := 0;
ReadXMLFile(doc,strm);
callNode := doc.DocumentElement;
if not SameText(base_xmlrpc_formatter.sMETHOD_RESPONSE,callNode.NodeName) then
Check(False,Format('XML root node must be "%s".',[base_xmlrpc_formatter.sMETHOD_RESPONSE]));
faultNode := FindNode(callNode,base_xmlrpc_formatter.sFAULT);
if ( faultNode = nil ) then begin
Check(False,Format('Invalid XmlRPC response message, "%s" or "%s" are not present.',[base_xmlrpc_formatter.sPARAMS,base_xmlrpc_formatter.sFAULT]));
end;
tmpNode := FindNode(faultNode,base_xmlrpc_formatter.sVALUE);
if ( tmpNode = nil ) then begin
Check(False,Format('Invalid XmlRPC fault response message, "%s" is not present.',[base_xmlrpc_formatter.sVALUE]));
end;
faultStruct := FindNode(tmpNode,XmlRpcDataTypeNames[xdtStruct]);
if ( faultStruct = nil ) then begin
Check(False,Format('Invalid XmlRPC fault response message, "%s" is not present.',[XmlRpcDataTypeNames[xdtStruct]]));
end;
tmpNode := loc_FindNode(faultStruct,base_xmlrpc_formatter.sFAULT_CODE);
if ( tmpNode = nil ) then begin
Check(False,Format('Invalid XmlRPC fault response message, "%s" is not present.',[base_xmlrpc_formatter.sFAULT_CODE]));
end;
excpt_code := tmpNode.FirstChild.NodeValue;
CheckEquals(VAL_CODE,excpt_code,base_xmlrpc_formatter.sFAULT_STRING);
tmpNode := loc_FindNode(faultStruct,base_xmlrpc_formatter.sFAULT_STRING);
if ( tmpNode = nil ) then begin
Check(False,Format('Invalid XmlRPC fault response message, "%s" is not present.',[base_xmlrpc_formatter.sFAULT_STRING]));
end;
excpt_msg := tmpNode.FirstChild.NodeValue;
CheckEquals(VAL_MSG,excpt_msg,base_xmlrpc_formatter.sFAULT_STRING);
finally
FreeAndNil(strm);
end;
end;
procedure TTest_XmlRpcFormatterExceptionBlock.ExceptBlock_client();
const
VAL_CODE = '1210'; VAL_MSG = 'This is a sample exception message.';
VAL_STREAM =
'<?xml version="1.0"?> ' +
' <methodResponse> ' +
' <fault> ' +
' <value> ' +
' <struct> ' +
' <member> ' +
' <name>faultCode</name> ' +
' <value> ' +
' <int>' + VAL_CODE + '</int> ' +
' </value> ' +
' </member> ' +
' <member> ' +
' <name>faultString</name> ' +
' <value> ' +
' <string>' + VAL_MSG + '</string> ' +
' </value> ' +
' </member> ' +
' </struct> ' +
' </value> ' +
' </fault> ' +
' </methodResponse>';
var
f : IFormatterClient;
strm : TStringStream;
excpt_code, excpt_msg : string;
begin
excpt_code := '';
excpt_msg := '';
f := CreateFormatterClient();
strm := TStringStream.Create(VAL_STREAM);
try
strm.Position := 0;
f.LoadFromStream(strm);
try
f.BeginCallRead(nil);
Check(False,'BeginCallRead() should raise an exception.');
except
on e : EXmlRpcException do begin
excpt_code := e.FaultCode;
excpt_msg := e.FaultString;
end;
end;
CheckEquals(VAL_CODE,excpt_code,'faultCode');
CheckEquals(VAL_MSG,excpt_msg,'faultString');
finally
FreeAndNil(strm);
end;
end;
initialization
RegisterStdTypes();
GetTypeRegistry().Register(sXSD_NS,TypeInfo(TTestEnum),'TTestEnum').RegisterExternalPropertyName('teOne', '1');
@ -3177,6 +3751,22 @@ initialization
RegisterExternalPropertyName(sARRAY_STYLE,sEmbedded);
end;
GetTypeRegistry().Register(sWST_BASE_NS,TypeInfo(TTestSmallRecord),'TTestSmallRecord').RegisterExternalPropertyName('__FIELDS__','fieldSmallint;fieldWord;fieldString');
{$IFNDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestSmallRecord)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(TypeInfo(TTestSmallRecord)),GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestSmallRecord)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestSmallRecord)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__TTestSmallRecord_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestSmallRecord)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
GetTypeRegistry().Register(sWST_BASE_NS,TypeInfo(TTestRecord),'TTestRecord').RegisterExternalPropertyName('__FIELDS__','fieldByte;fieldShortInt;fieldSmallint;fieldWord;fieldInteger;fieldLongWord;fieldInt64;fieldQWord;fieldComp;fieldSingle;fieldDouble;fieldExtended;fieldCurrency;fieldBoolean;fieldString;fieldRecord');
{$IFNDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestRecord)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(TypeInfo(TTestRecord)),GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestRecord)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
{$IFDEF WST_RECORD_RTTI}
GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestRecord)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__TTestRecord_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(TTestRecord)].GetExternalPropertyName('__FIELDS__')));
{$ENDIF WST_RECORD_RTTI}
{$IFDEF FPC}
RegisterTest(TTestArray);
RegisterTest(TTestSOAPFormatter);
@ -3190,6 +3780,8 @@ initialization
RegisterTest(TTestXmlRpcFormatterAttributes);
RegisterTest(TTestXmlRpcFormatter);
RegisterTest(TTest_SoapFormatterExceptionBlock);
RegisterTest(TTest_XmlRpcFormatterExceptionBlock);
{$ELSE}
RegisterTest(TTestArray.Suite);
RegisterTest(TTestSOAPFormatter.Suite);
@ -3203,5 +3795,9 @@ initialization
RegisterTest(TTestXmlRpcFormatterAttributes.Suite);
RegisterTest(TTestXmlRpcFormatter.Suite);
RegisterTest(TTest_SoapFormatterExceptionBlock.Suite);
RegisterTest(TTest_XmlRpcFormatterExceptionBlock.Suite);
{$ENDIF}
end.

View File

@ -27,9 +27,6 @@ uses
pascal_parser_intf,
metadata_wsdl;
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
type
{ TTestMetadata }

View File

@ -7,7 +7,7 @@
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="4"/>
<ActiveEditorIndexAtStart Value="2"/>
</General>
<PublishOptions>
<Version Value="2"/>
@ -27,27 +27,25 @@
<PackageName Value="FPCUnitTestRunner"/>
</Item1>
</RequiredPackages>
<Units Count="72">
<Units Count="74">
<Unit0>
<Filename Value="wst_test_suite.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_test_suite"/>
<CursorPos X="9" Y="5"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<CursorPos X="48" Y="5"/>
<TopLine Value="4"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="testformatter_unit.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="testformatter_unit"/>
<CursorPos X="17" Y="1733"/>
<TopLine Value="1726"/>
<EditorIndex Value="4"/>
<CursorPos X="3" Y="901"/>
<TopLine Value="890"/>
<EditorIndex Value="11"/>
<UsageCount Value="200"/>
<Bookmarks Count="1">
<Item0 X="17" Y="984" ID="3"/>
<Item0 X="17" Y="1046" ID="3"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit1>
@ -55,25 +53,29 @@
<Filename Value="..\..\server_service_soap.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="server_service_soap"/>
<CursorPos X="38" Y="29"/>
<TopLine Value="18"/>
<CursorPos X="8" Y="182"/>
<TopLine Value="161"/>
<EditorIndex Value="7"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="..\..\soap_formatter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="soap_formatter"/>
<CursorPos X="26" Y="13"/>
<TopLine Value="1"/>
<CursorPos X="31" Y="148"/>
<TopLine Value="148"/>
<EditorIndex Value="8"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="..\..\base_binary_formatter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="base_binary_formatter"/>
<CursorPos X="15" Y="1479"/>
<TopLine Value="1464"/>
<EditorIndex Value="12"/>
<CursorPos X="31" Y="19"/>
<TopLine Value="13"/>
<EditorIndex Value="14"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit4>
@ -81,13 +83,13 @@
<Filename Value="..\..\base_service_intf.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="base_service_intf"/>
<CursorPos X="46" Y="4524"/>
<TopLine Value="4490"/>
<CursorPos X="19" Y="10"/>
<TopLine Value="10"/>
<EditorIndex Value="0"/>
<UsageCount Value="200"/>
<Bookmarks Count="2">
<Item0 X="33" Y="1130" ID="0"/>
<Item1 X="5" Y="1184" ID="1"/>
<Item0 X="33" Y="1135" ID="0"/>
<Item1 X="5" Y="1189" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit5>
@ -95,9 +97,9 @@
<Filename Value="..\..\base_soap_formatter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="base_soap_formatter"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="1"/>
<CursorPos X="3" Y="1127"/>
<TopLine Value="1116"/>
<EditorIndex Value="4"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit6>
@ -105,17 +107,19 @@
<Filename Value="..\..\binary_formatter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="binary_formatter"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<CursorPos X="12" Y="108"/>
<TopLine Value="103"/>
<EditorIndex Value="15"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="..\..\binary_streamer.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="binary_streamer"/>
<CursorPos X="14" Y="14"/>
<CursorPos X="1" Y="14"/>
<TopLine Value="1"/>
<EditorIndex Value="17"/>
<EditorIndex Value="1"/>
<UsageCount Value="200"/>
<Bookmarks Count="1">
<Item0 X="38" Y="490" ID="2"/>
@ -126,34 +130,34 @@
<Filename Value="..\..\server_binary_formatter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="server_binary_formatter"/>
<CursorPos X="26" Y="13"/>
<CursorPos X="22" Y="21"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="..\..\metadata_repository.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="metadata_repository"/>
<CursorPos X="1" Y="334"/>
<TopLine Value="337"/>
<CursorPos X="51" Y="18"/>
<TopLine Value="1"/>
<UsageCount Value="200"/>
</Unit10>
<Unit11>
<Filename Value="testmetadata_unit.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="testmetadata_unit"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="14"/>
<CursorPos X="1" Y="30"/>
<TopLine Value="7"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\..\ws_helper\metadata_generator.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="metadata_generator"/>
<CursorPos X="1" Y="19"/>
<TopLine Value="67"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="40"/>
<UsageCount Value="202"/>
</Unit12>
<Unit13>
@ -161,20 +165,19 @@
<IsPartOfProject Value="True"/>
<UnitName Value="parserdefs"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<TopLine Value="16"/>
<UsageCount Value="202"/>
<Bookmarks Count="2">
<Item0 X="45" Y="1146" ID="0"/>
<Item1 X="18" Y="1133" ID="2"/>
<Bookmarks Count="1">
<Item0 X="18" Y="1133" ID="2"/>
</Bookmarks>
</Unit13>
<Unit14>
<Filename Value="..\..\metadata_wsdl.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="metadata_wsdl"/>
<CursorPos X="44" Y="21"/>
<TopLine Value="209"/>
<EditorIndex Value="13"/>
<CursorPos X="1" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="16"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
</Unit14>
@ -183,61 +186,63 @@
<UnitName Value="DOM"/>
<CursorPos X="15" Y="429"/>
<TopLine Value="413"/>
<UsageCount Value="5"/>
<UsageCount Value="3"/>
</Unit15>
<Unit16>
<Filename Value="D:\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutilh.inc"/>
<CursorPos X="13" Y="235"/>
<TopLine Value="215"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit16>
<Unit17>
<Filename Value="..\..\server_service_intf.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="server_service_intf"/>
<CursorPos X="54" Y="19"/>
<CursorPos X="25" Y="14"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<EditorIndex Value="6"/>
<UsageCount Value="203"/>
<Loaded Value="True"/>
</Unit17>
<Unit18>
<Filename Value="..\..\service_intf.pas"/>
<UnitName Value="service_intf"/>
<CursorPos X="3" Y="38"/>
<TopLine Value="27"/>
<UsageCount Value="15"/>
<CursorPos X="15" Y="15"/>
<TopLine Value="1"/>
<EditorIndex Value="13"/>
<UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="D:\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\classesh.inc"/>
<CursorPos X="3" Y="316"/>
<TopLine Value="304"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit19>
<Unit20>
<Filename Value="D:\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\lists.inc"/>
<CursorPos X="3" Y="407"/>
<TopLine Value="404"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit20>
<Unit21>
<Filename Value="D:\lazarusClean\fpc\2.0.4\source\fcl\inc\contnrs.pp"/>
<UnitName Value="contnrs"/>
<CursorPos X="3" Y="474"/>
<TopLine Value="471"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit21>
<Unit22>
<Filename Value="D:\lazarusClean\fpc\2.0.4\source\rtl\inc\objpash.inc"/>
<CursorPos X="27" Y="121"/>
<TopLine Value="104"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit22>
<Unit23>
<Filename Value="D:\lazarusClean\fpc\2.0.4\source\rtl\inc\objpas.inc"/>
<CursorPos X="9" Y="166"/>
<TopLine Value="142"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit23>
<Unit24>
<Filename Value="D:\Lazarus\components\fpcunit\guitestrunner.pas"/>
@ -246,302 +251,280 @@
<UnitName Value="GuiTestRunner"/>
<CursorPos X="34" Y="32"/>
<TopLine Value="25"/>
<UsageCount Value="9"/>
<UsageCount Value="7"/>
</Unit24>
<Unit25>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\fpcunit\fpcunit.pp"/>
<UnitName Value="fpcunit"/>
<CursorPos X="21" Y="94"/>
<TopLine Value="83"/>
<UsageCount Value="7"/>
<UsageCount Value="5"/>
</Unit25>
<Unit26>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\fpcunit\DUnitCompatibleInterface.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="4"/>
<UsageCount Value="1"/>
</Unit26>
<Unit27>
<Filename Value="..\..\imp_utils.pas"/>
<UnitName Value="imp_utils"/>
<CursorPos X="15" Y="36"/>
<TopLine Value="22"/>
<UsageCount Value="1"/>
</Unit27>
<Unit28>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="3" Y="51"/>
<TopLine Value="41"/>
<UsageCount Value="1"/>
</Unit28>
<Unit29>
<CursorPos X="15" Y="50"/>
<TopLine Value="8"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit26>
<Unit27>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\xmlread.pp"/>
<UnitName Value="XMLRead"/>
<CursorPos X="43" Y="13"/>
<TopLine Value="1"/>
<UsageCount Value="5"/>
</Unit29>
<Unit30>
<UsageCount Value="3"/>
</Unit27>
<Unit28>
<Filename Value="test_parserdef.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="test_parserdef"/>
<CursorPos X="93" Y="76"/>
<TopLine Value="11"/>
<UsageCount Value="176"/>
</Unit30>
<Unit31>
<UsageCount Value="198"/>
</Unit28>
<Unit29>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\inc\objpash.inc"/>
<CursorPos X="8" Y="190"/>
<TopLine Value="133"/>
<UsageCount Value="6"/>
</Unit31>
<Unit32>
<UsageCount Value="4"/>
</Unit29>
<Unit30>
<Filename Value="..\..\wst.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="12"/>
</Unit32>
<Unit33>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\objpas.pp"/>
<UnitName Value="objpas"/>
<CursorPos X="47" Y="64"/>
<TopLine Value="38"/>
<UsageCount Value="1"/>
</Unit33>
<Unit34>
<UsageCount Value="10"/>
</Unit30>
<Unit31>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\inc\heaph.inc"/>
<CursorPos X="43" Y="100"/>
<TopLine Value="83"/>
<UsageCount Value="4"/>
</Unit34>
<Unit35>
<UsageCount Value="2"/>
</Unit31>
<Unit32>
<Filename Value="..\test_fpc\interface_problem\interface_problem.pas"/>
<UnitName Value="interface_problem"/>
<CursorPos X="1" Y="10"/>
<TopLine Value="1"/>
<UsageCount Value="12"/>
</Unit35>
<Unit36>
<UsageCount Value="10"/>
</Unit32>
<Unit33>
<Filename Value="..\..\base_xmlrpc_formatter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="base_xmlrpc_formatter"/>
<CursorPos X="8" Y="1352"/>
<TopLine Value="1335"/>
<EditorIndex Value="2"/>
<UsageCount Value="114"/>
<CursorPos X="32" Y="64"/>
<TopLine Value="49"/>
<EditorIndex Value="5"/>
<UsageCount Value="136"/>
<Loaded Value="True"/>
</Unit36>
<Unit37>
</Unit33>
<Unit34>
<Filename Value="..\..\ws_helper\pscanner.pp"/>
<UnitName Value="PScanner"/>
<CursorPos X="19" Y="505"/>
<TopLine Value="491"/>
<UsageCount Value="19"/>
</Unit37>
<Unit38>
<UsageCount Value="17"/>
</Unit34>
<Unit35>
<Filename Value="..\..\ws_helper\pascal_parser_intf.pas"/>
<UnitName Value="pascal_parser_intf"/>
<CursorPos X="62" Y="296"/>
<TopLine Value="296"/>
<UsageCount Value="29"/>
</Unit38>
<Unit39>
<UsageCount Value="27"/>
</Unit35>
<Unit36>
<Filename Value="..\..\ws_helper\pastree.pp"/>
<UnitName Value="PasTree"/>
<CursorPos X="18" Y="254"/>
<TopLine Value="243"/>
<UsageCount Value="19"/>
</Unit39>
<Unit40>
<UsageCount Value="17"/>
</Unit36>
<Unit37>
<Filename Value="..\..\..\..\..\..\lazarus_23_215\fpc\2.1.5\source\packages\fcl-xml\src\dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="38" Y="225"/>
<TopLine Value="203"/>
<UsageCount Value="18"/>
</Unit40>
<Unit41>
<UsageCount Value="16"/>
</Unit37>
<Unit38>
<Filename Value="..\..\wst_rtti_filter\cursor_intf.pas"/>
<UnitName Value="cursor_intf"/>
<CursorPos X="3" Y="75"/>
<TopLine Value="70"/>
<UsageCount Value="10"/>
</Unit41>
<Unit42>
<UsageCount Value="8"/>
</Unit38>
<Unit39>
<Filename Value="..\..\wst_rtti_filter\dom_cursors.pas"/>
<UnitName Value="dom_cursors"/>
<CursorPos X="3" Y="182"/>
<TopLine Value="180"/>
<UsageCount Value="10"/>
</Unit42>
<Unit43>
<UsageCount Value="8"/>
</Unit39>
<Unit40>
<Filename Value="..\..\..\..\..\..\lazarus_23_215\fpc\2.1.5\source\packages\fcl-fpcunit\src\fpcunit.pp"/>
<UnitName Value="fpcunit"/>
<CursorPos X="1" Y="446"/>
<TopLine Value="434"/>
<UsageCount Value="8"/>
</Unit43>
<Unit44>
<UsageCount Value="6"/>
</Unit40>
<Unit41>
<Filename Value="..\..\..\..\..\..\lazarus_23_215\fpc\2.1.5\source\rtl\i386\i386.inc"/>
<CursorPos X="1" Y="1284"/>
<TopLine Value="1268"/>
<UsageCount Value="7"/>
</Unit44>
<Unit45>
<UsageCount Value="5"/>
</Unit41>
<Unit42>
<Filename Value="..\..\..\..\..\..\lazarus_23_215\fpc\2.1.5\source\rtl\objpas\classes\streams.inc"/>
<CursorPos X="1" Y="107"/>
<TopLine Value="95"/>
<UsageCount Value="7"/>
</Unit45>
<Unit46>
<UsageCount Value="5"/>
</Unit42>
<Unit43>
<Filename Value="..\..\semaphore.pas"/>
<UnitName Value="semaphore"/>
<CursorPos X="3" Y="30"/>
<TopLine Value="23"/>
<UsageCount Value="9"/>
</Unit46>
<Unit47>
<UsageCount Value="7"/>
</Unit43>
<Unit44>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="14" Y="351"/>
<TopLine Value="336"/>
<UsageCount Value="10"/>
</Unit47>
<Unit48>
<UsageCount Value="8"/>
</Unit44>
<Unit45>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\win32\system.pp"/>
<UnitName Value="System"/>
<CursorPos X="22" Y="33"/>
<TopLine Value="18"/>
<UsageCount Value="8"/>
</Unit48>
<Unit49>
<UsageCount Value="6"/>
</Unit45>
<Unit46>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-base\src\inc\contnrs.pp"/>
<UnitName Value="contnrs"/>
<CursorPos X="3" Y="964"/>
<TopLine Value="962"/>
<UsageCount Value="7"/>
</Unit49>
<Unit50>
<UsageCount Value="5"/>
</Unit46>
<Unit47>
<Filename Value="..\..\wst_delphi.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="12"/>
</Unit50>
<Unit51>
<UsageCount Value="10"/>
</Unit47>
<Unit48>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\strutils.pp"/>
<UnitName Value="strutils"/>
<CursorPos X="10" Y="29"/>
<TopLine Value="14"/>
<UsageCount Value="7"/>
</Unit51>
<Unit52>
<UsageCount Value="5"/>
</Unit48>
<Unit49>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpash.inc"/>
<CursorPos X="20" Y="168"/>
<TopLine Value="166"/>
<UsageCount Value="7"/>
</Unit52>
<Unit53>
<UsageCount Value="5"/>
</Unit49>
<Unit50>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpas.inc"/>
<CursorPos X="11" Y="442"/>
<TopLine Value="556"/>
<UsageCount Value="7"/>
</Unit53>
<Unit54>
<UsageCount Value="5"/>
</Unit50>
<Unit51>
<Filename Value="..\..\wst_fpc_xml.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_fpc_xml"/>
<CursorPos X="8" Y="38"/>
<TopLine Value="11"/>
<UsageCount Value="60"/>
</Unit54>
<Unit55>
<CursorPos X="3" Y="53"/>
<TopLine Value="51"/>
<UsageCount Value="82"/>
</Unit51>
<Unit52>
<Filename Value="..\..\wst_global.inc"/>
<CursorPos X="1" Y="1"/>
<CursorPos X="20" Y="11"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
</Unit55>
<Unit56>
<UsageCount Value="10"/>
</Unit52>
<Unit53>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-base\src\inc\custapp.pp"/>
<UnitName Value="CustApp"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="7"/>
</Unit56>
<Unit57>
<UsageCount Value="5"/>
</Unit53>
<Unit54>
<Filename Value="test_utilities.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="test_utilities"/>
<CursorPos X="29" Y="43"/>
<CursorPos X="71" Y="3"/>
<TopLine Value="3"/>
<EditorIndex Value="16"/>
<UsageCount Value="51"/>
<EditorIndex Value="17"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit57>
<Unit58>
</Unit54>
<Unit55>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-fpcunit\src\fpcunit.pp"/>
<UnitName Value="fpcunit"/>
<CursorPos X="21" Y="99"/>
<TopLine Value="84"/>
<UsageCount Value="15"/>
</Unit58>
<Unit59>
<CursorPos X="66" Y="231"/>
<TopLine Value="231"/>
<UsageCount Value="13"/>
</Unit55>
<Unit56>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-fpcunit\src\testregistry.pp"/>
<UnitName Value="testregistry"/>
<CursorPos X="39" Y="27"/>
<CursorPos X="11" Y="32"/>
<TopLine Value="17"/>
<EditorIndex Value="15"/>
<UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit59>
<Unit60>
<UsageCount Value="15"/>
</Unit56>
<Unit57>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-fpcunit\src\testdecorator.pp"/>
<UnitName Value="testdecorator"/>
<CursorPos X="3" Y="30"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
</Unit60>
<Unit61>
<UsageCount Value="7"/>
</Unit57>
<Unit58>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-fpcunit\src\DUnitCompatibleInterface.inc"/>
<CursorPos X="11" Y="49"/>
<TopLine Value="47"/>
<UsageCount Value="14"/>
</Unit61>
<Unit62>
<CursorPos X="21" Y="9"/>
<TopLine Value="1"/>
<UsageCount Value="12"/>
</Unit58>
<Unit59>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
<UnitName Value="typinfo"/>
<CursorPos X="79" Y="218"/>
<TopLine Value="203"/>
<UsageCount Value="12"/>
</Unit62>
<Unit63>
<UsageCount Value="10"/>
</Unit59>
<Unit60>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstrh.inc"/>
<CursorPos X="89" Y="122"/>
<TopLine Value="106"/>
<UsageCount Value="11"/>
</Unit63>
<Unit64>
<UsageCount Value="9"/>
</Unit60>
<Unit61>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysinth.inc"/>
<CursorPos X="24" Y="63"/>
<TopLine Value="46"/>
<UsageCount Value="11"/>
</Unit64>
<Unit65>
<UsageCount Value="9"/>
</Unit61>
<Unit62>
<Filename Value="..\..\ws_helper\wsdl2pas_imp.pas"/>
<UnitName Value="wsdl2pas_imp"/>
<CursorPos X="16" Y="2045"/>
<TopLine Value="2031"/>
<EditorIndex Value="6"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit65>
<Unit66>
<CursorPos X="1" Y="1"/>
<TopLine Value="31"/>
<UsageCount Value="10"/>
</Unit62>
<Unit63>
<Filename Value="..\..\..\..\..\..\lazarus2204\fpc\2.0.4\source\fcl\xml\dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="3" Y="196"/>
<TopLine Value="191"/>
<UsageCount Value="10"/>
</Unit66>
<Unit67>
<UsageCount Value="8"/>
</Unit63>
<Unit64>
<Filename Value="..\..\type_lib_edtr\umoduleedit.pas"/>
<ComponentName Value="fModuleEdit"/>
<HasResources Value="True"/>
@ -549,11 +532,9 @@
<UnitName Value="umoduleedit"/>
<CursorPos X="47" Y="21"/>
<TopLine Value="18"/>
<EditorIndex Value="7"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit67>
<Unit68>
<UsageCount Value="10"/>
</Unit64>
<Unit65>
<Filename Value="..\..\type_lib_edtr\ubindingedit.pas"/>
<ComponentName Value="fBindingEdit"/>
<HasResources Value="True"/>
@ -561,11 +542,9 @@
<UnitName Value="ubindingedit"/>
<CursorPos X="41" Y="21"/>
<TopLine Value="18"/>
<EditorIndex Value="8"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit68>
<Unit69>
<UsageCount Value="10"/>
</Unit65>
<Unit66>
<Filename Value="..\..\type_lib_edtr\ufarrayedit.pas"/>
<ComponentName Value="fArrayEdit"/>
<HasResources Value="True"/>
@ -573,11 +552,9 @@
<UnitName Value="ufarrayedit"/>
<CursorPos X="41" Y="9"/>
<TopLine Value="5"/>
<EditorIndex Value="9"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit69>
<Unit70>
<UsageCount Value="10"/>
</Unit66>
<Unit67>
<Filename Value="..\..\type_lib_edtr\uftypealiasedit.pas"/>
<ComponentName Value="fTypeAliasEdit"/>
<HasResources Value="True"/>
@ -585,11 +562,9 @@
<UnitName Value="uftypealiasedit"/>
<CursorPos X="22" Y="9"/>
<TopLine Value="7"/>
<EditorIndex Value="10"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit70>
<Unit71>
<UsageCount Value="10"/>
</Unit67>
<Unit68>
<Filename Value="..\..\type_lib_edtr\ufrmsaveoption.pas"/>
<ComponentName Value="frmSaveOptions"/>
<HasResources Value="True"/>
@ -597,12 +572,76 @@
<UnitName Value="ufrmsaveoption"/>
<CursorPos X="22" Y="9"/>
<TopLine Value="6"/>
<EditorIndex Value="11"/>
<UsageCount Value="10"/>
</Unit68>
<Unit69>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysutilh.inc"/>
<CursorPos X="4" Y="64"/>
<TopLine Value="64"/>
<UsageCount Value="8"/>
</Unit69>
<Unit70>
<Filename Value="..\..\server_service_xmlrpc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="server_service_xmlrpc"/>
<CursorPos X="14" Y="144"/>
<TopLine Value="136"/>
<EditorIndex Value="10"/>
<UsageCount Value="27"/>
<Loaded Value="True"/>
</Unit70>
<Unit71>
<Filename Value="..\..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\xmlread.pp"/>
<UnitName Value="XMLRead"/>
<CursorPos X="6" Y="37"/>
<TopLine Value="31"/>
<UsageCount Value="10"/>
</Unit71>
<Unit72>
<Filename Value="..\..\xmlrpc_formatter.pas"/>
<UnitName Value="xmlrpc_formatter"/>
<CursorPos X="31" Y="131"/>
<TopLine Value="116"/>
<EditorIndex Value="12"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit71>
</Unit72>
<Unit73>
<Filename Value="..\..\record_rtti.pas"/>
<UnitName Value="record_rtti"/>
<CursorPos X="3" Y="248"/>
<TopLine Value="13"/>
<EditorIndex Value="2"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit73>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
<JumpHistory Count="6" HistoryIndex="5">
<Position1>
<Filename Value="..\..\base_service_intf.pas"/>
<Caret Line="1211" Column="10" TopLine="1211"/>
</Position1>
<Position2>
<Filename Value="..\..\base_service_intf.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="..\..\base_service_intf.pas"/>
<Caret Line="4614" Column="1" TopLine="4572"/>
</Position3>
<Position4>
<Filename Value="..\..\server_binary_formatter.pas"/>
<Caret Line="121" Column="11" TopLine="111"/>
</Position4>
<Position5>
<Filename Value="..\..\server_binary_formatter.pas"/>
<Caret Line="21" Column="22" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="..\..\base_binary_formatter.pas"/>
<Caret Line="19" Column="31" TopLine="13"/>
</Position6>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
@ -622,6 +661,10 @@
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
</Checks>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking>

View File

@ -15,7 +15,8 @@ uses
base_service_intf, base_soap_formatter, binary_formatter, binary_streamer,
server_binary_formatter, metadata_repository,
metadata_generator, parserdefs, server_service_intf, metadata_wsdl,
test_parserdef, base_xmlrpc_formatter, wst_fpc_xml, test_utilities;
test_parserdef, base_xmlrpc_formatter, wst_fpc_xml, test_utilities,
server_service_xmlrpc;
Const
ShortOpts = 'alh';

View File

@ -7,7 +7,7 @@
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="4"/>
<ActiveEditorIndexAtStart Value="2"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -32,13 +32,13 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="81">
<Units Count="83">
<Unit0>
<Filename Value="typ_lib_edtr.lpr"/>
<IsPartOfProject Value="True"/>
<CursorPos X="1" Y="21"/>
<TopLine Value="1"/>
<EditorIndex Value="4"/>
<EditorIndex Value="2"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit0>
@ -49,8 +49,8 @@
<IsPartOfProject Value="True"/>
<ResourceFilename Value="uwsttypelibraryedit.lrs"/>
<UnitName Value="uwsttypelibraryedit"/>
<CursorPos X="31" Y="22"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="234"/>
<TopLine Value="201"/>
<EditorIndex Value="0"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
@ -60,15 +60,15 @@
<UnitName Value="parserdefs"/>
<CursorPos X="1" Y="35"/>
<TopLine Value="22"/>
<UsageCount Value="41"/>
<UsageCount Value="40"/>
</Unit2>
<Unit3>
<Filename Value="..\ws_helper\wsdl2pas_imp.pas"/>
<UnitName Value="wsdl2pas_imp"/>
<CursorPos X="1" Y="1086"/>
<TopLine Value="1064"/>
<EditorIndex Value="13"/>
<UsageCount Value="91"/>
<CursorPos X="39" Y="1634"/>
<TopLine Value="1628"/>
<EditorIndex Value="9"/>
<UsageCount Value="99"/>
<Bookmarks Count="1">
<Item0 X="65" Y="750" ID="2"/>
</Bookmarks>
@ -78,13 +78,10 @@
<Filename Value="wsdl_generator.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wsdl_generator"/>
<CursorPos X="45" Y="707"/>
<TopLine Value="684"/>
<EditorIndex Value="18"/>
<CursorPos X="26" Y="13"/>
<TopLine Value="1"/>
<EditorIndex Value="7"/>
<UsageCount Value="200"/>
<Bookmarks Count="1">
<Item0 X="49" Y="446" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit4>
<Unit5>
@ -96,9 +93,7 @@
<UnitName Value="uabout"/>
<CursorPos X="46" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="1"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="ufenumedit.pas"/>
@ -109,9 +104,7 @@
<UnitName Value="ufEnumedit"/>
<CursorPos X="27" Y="78"/>
<TopLine Value="58"/>
<EditorIndex Value="14"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="view_helper.pas"/>
@ -119,17 +112,15 @@
<UnitName Value="view_helper"/>
<CursorPos X="3" Y="207"/>
<TopLine Value="193"/>
<EditorIndex Value="12"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="..\ws_helper\source_utils.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="source_utils"/>
<CursorPos X="1" Y="244"/>
<TopLine Value="1"/>
<EditorIndex Value="11"/>
<CursorPos X="5" Y="315"/>
<TopLine Value="288"/>
<EditorIndex Value="8"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit8>
@ -138,8 +129,8 @@
<IsPartOfProject Value="True"/>
<UnitName Value="edit_helper"/>
<CursorPos X="16" Y="105"/>
<TopLine Value="98"/>
<EditorIndex Value="3"/>
<TopLine Value="25"/>
<EditorIndex Value="1"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit9>
@ -152,9 +143,7 @@
<UnitName Value="ufclassedit"/>
<CursorPos X="1" Y="336"/>
<TopLine Value="299"/>
<EditorIndex Value="5"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="ufpropedit.pas"/>
@ -164,100 +153,98 @@
<UnitName Value="ufpropedit"/>
<CursorPos X="1" Y="129"/>
<TopLine Value="118"/>
<EditorIndex Value="8"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\..\..\..\lazarus23_213\lcl\comctrls.pp"/>
<UnitName Value="ComCtrls"/>
<CursorPos X="15" Y="1781"/>
<TopLine Value="1768"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit12>
<Unit13>
<Filename Value="..\ws_helper\parserutils.pas"/>
<UnitName Value="parserutils"/>
<CursorPos X="17" Y="20"/>
<TopLine Value="19"/>
<EditorIndex Value="7"/>
<UsageCount Value="78"/>
<EditorIndex Value="3"/>
<UsageCount Value="86"/>
<Loaded Value="True"/>
</Unit13>
<Unit14>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\i386\i386.inc"/>
<CursorPos X="2" Y="1284"/>
<TopLine Value="1263"/>
<UsageCount Value="7"/>
<UsageCount Value="6"/>
</Unit14>
<Unit15>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\inc\except.inc"/>
<CursorPos X="1" Y="223"/>
<TopLine Value="209"/>
<UsageCount Value="7"/>
<UsageCount Value="6"/>
</Unit15>
<Unit16>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\inc\objpas.inc"/>
<CursorPos X="1" Y="152"/>
<TopLine Value="138"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit16>
<Unit17>
<Filename Value="ufclassedit.lrs"/>
<CursorPos X="39" Y="2"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit17>
<Unit18>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\inc\wstrings.inc"/>
<CursorPos X="1" Y="317"/>
<TopLine Value="303"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit18>
<Unit19>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\packages\fcl-xml\src\dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="3" Y="2064"/>
<TopLine Value="2041"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit19>
<Unit20>
<Filename Value="..\..\..\..\lazarus23_213\lcl\stdctrls.pp"/>
<UnitName Value="StdCtrls"/>
<CursorPos X="24" Y="362"/>
<TopLine Value="348"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit20>
<Unit21>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\objpas\classes\classesh.inc"/>
<CursorPos X="12" Y="64"/>
<TopLine Value="49"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit21>
<Unit22>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\objpas\classes\stringl.inc"/>
<CursorPos X="15" Y="1071"/>
<TopLine Value="1056"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit22>
<Unit23>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\objpas\types.pp"/>
<UnitName Value="types"/>
<CursorPos X="6" Y="15"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit23>
<Unit24>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\objpas\sysutils\sysstrh.inc"/>
<CursorPos X="10" Y="104"/>
<TopLine Value="90"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit24>
<Unit25>
<Filename Value="..\..\..\..\lazarus23_213\fpc\2.1.3\source\rtl\objpas\sysutils\sysstr.inc"/>
<CursorPos X="1" Y="689"/>
<TopLine Value="686"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit25>
<Unit26>
<Filename Value="uinterfaceedit.pas"/>
@ -267,15 +254,13 @@
<UnitName Value="uinterfaceedit"/>
<CursorPos X="86" Y="277"/>
<TopLine Value="266"/>
<EditorIndex Value="2"/>
<UsageCount Value="177"/>
<Loaded Value="True"/>
<UsageCount Value="192"/>
</Unit26>
<Unit27>
<Filename Value="uinterfaceedit.lfm"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
<SyntaxHighlighter Value="LFM"/>
</Unit27>
<Unit28>
@ -286,82 +271,87 @@
<UnitName Value="udm"/>
<CursorPos X="15" Y="2"/>
<TopLine Value="1"/>
<UsageCount Value="172"/>
<UsageCount Value="187"/>
</Unit28>
<Unit29>
<Filename Value="..\..\..\..\lazarus23_213\lcl\include\treeview.inc"/>
<CursorPos X="25" Y="68"/>
<TopLine Value="61"/>
<UsageCount Value="4"/>
<UsageCount Value="3"/>
</Unit29>
<Unit30>
<Filename Value="..\ws_helper\pascal_parser_intf.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="pascal_parser_intf"/>
<CursorPos X="70" Y="182"/>
<TopLine Value="175"/>
<EditorIndex Value="16"/>
<UsageCount Value="135"/>
<CursorPos X="7" Y="454"/>
<TopLine Value="422"/>
<EditorIndex Value="10"/>
<UsageCount Value="150"/>
<Loaded Value="True"/>
</Unit30>
<Unit31>
<Filename Value="..\ws_helper\pparser.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="PParser"/>
<CursorPos X="4" Y="2133"/>
<TopLine Value="2127"/>
<UsageCount Value="135"/>
<CursorPos X="1" Y="205"/>
<TopLine Value="190"/>
<EditorIndex Value="5"/>
<UsageCount Value="150"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
<Filename Value="..\ws_helper\logger_intf.pas"/>
<UnitName Value="logger_intf"/>
<CursorPos X="2" Y="12"/>
<TopLine Value="37"/>
<UsageCount Value="35"/>
<UsageCount Value="34"/>
</Unit32>
<Unit33>
<Filename Value="..\ws_helper\pastree.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="PasTree"/>
<CursorPos X="3" Y="108"/>
<TopLine Value="161"/>
<EditorIndex Value="17"/>
<UsageCount Value="135"/>
<CursorPos X="37" Y="658"/>
<TopLine Value="648"/>
<EditorIndex Value="11"/>
<UsageCount Value="150"/>
<Loaded Value="True"/>
</Unit33>
<Unit34>
<Filename Value="..\..\..\..\lazarus_23_215\lcl\include\treeview.inc"/>
<CursorPos X="35" Y="71"/>
<TopLine Value="58"/>
<UsageCount Value="3"/>
<UsageCount Value="2"/>
</Unit34>
<Unit35>
<Filename Value="..\..\..\..\lazarus23_213\lcl\include\customcheckbox.inc"/>
<CursorPos X="1" Y="120"/>
<TopLine Value="108"/>
<UsageCount Value="4"/>
<UsageCount Value="3"/>
</Unit35>
<Unit36>
<Filename Value="umain.lrs"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit36>
<Unit37>
<Filename Value="..\wst_rtti_filter\rtti_filters.pas"/>
<UnitName Value="rtti_filters"/>
<CursorPos X="1" Y="236"/>
<TopLine Value="219"/>
<UsageCount Value="25"/>
<UsageCount Value="24"/>
</Unit37>
<Unit38>
<Filename Value="..\ws_helper\generator.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="generator"/>
<CursorPos X="44" Y="1783"/>
<TopLine Value="1758"/>
<EditorIndex Value="10"/>
<UsageCount Value="52"/>
<CursorPos X="34" Y="1403"/>
<TopLine Value="1391"/>
<EditorIndex Value="4"/>
<UsageCount Value="67"/>
<Bookmarks Count="1">
<Item0 X="36" Y="2042" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit38>
<Unit39>
@ -369,49 +359,49 @@
<UnitName Value="dom_cursors"/>
<CursorPos X="1" Y="239"/>
<TopLine Value="222"/>
<UsageCount Value="22"/>
<UsageCount Value="21"/>
</Unit39>
<Unit40>
<Filename Value="..\ws_helper\command_line_parser.pas"/>
<UnitName Value="command_line_parser"/>
<CursorPos X="20" Y="31"/>
<TopLine Value="17"/>
<UsageCount Value="20"/>
<UsageCount Value="19"/>
</Unit40>
<Unit41>
<Filename Value="..\..\..\..\..\lazarus_23_215\lcl\forms.pp"/>
<UnitName Value="Forms"/>
<CursorPos X="44" Y="10"/>
<TopLine Value="1"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit41>
<Unit42>
<Filename Value="..\ws_helper\pscanner.pp"/>
<UnitName Value="PScanner"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="322"/>
<UsageCount Value="9"/>
<UsageCount Value="8"/>
</Unit42>
<Unit43>
<Filename Value="..\ws_helper\metadata_generator.pas"/>
<UnitName Value="metadata_generator"/>
<CursorPos X="11" Y="20"/>
<TopLine Value="14"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit43>
<Unit44>
<Filename Value="..\ide\lazarus\wst_register.pas"/>
<UnitName Value="wst_register"/>
<CursorPos X="42" Y="6"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit44>
<Unit45>
<Filename Value="..\..\..\..\..\lazarus_23_215\ideintf\menuintf.pas"/>
<UnitName Value="MenuIntf"/>
<CursorPos X="53" Y="417"/>
<TopLine Value="409"/>
<UsageCount Value="7"/>
<UsageCount Value="6"/>
</Unit45>
<Unit46>
<Filename Value="..\ide\lazarus\wstimportdlg.pas"/>
@ -420,28 +410,28 @@
<UnitName Value="wstimportdlg"/>
<CursorPos X="29" Y="60"/>
<TopLine Value="154"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit46>
<Unit47>
<Filename Value="..\..\..\..\..\lazarus_23_215\ideintf\lazideintf.pas"/>
<UnitName Value="LazIDEIntf"/>
<CursorPos X="33" Y="174"/>
<TopLine Value="162"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit47>
<Unit48>
<Filename Value="..\..\..\..\..\lazarus_23_215\ideintf\projectintf.pas"/>
<UnitName Value="ProjectIntf"/>
<CursorPos X="3" Y="284"/>
<TopLine Value="262"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit48>
<Unit49>
<Filename Value="..\..\..\..\..\lazarus_23_215\ideintf\idecommands.pas"/>
<UnitName Value="IDECommands"/>
<CursorPos X="47" Y="291"/>
<TopLine Value="279"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit49>
<Unit50>
<Filename Value="uprocedit.pas"/>
@ -451,14 +441,14 @@
<UnitName Value="uprocedit"/>
<CursorPos X="2" Y="12"/>
<TopLine Value="1"/>
<UsageCount Value="91"/>
<UsageCount Value="106"/>
</Unit50>
<Unit51>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\lcl\comctrls.pp"/>
<UnitName Value="ComCtrls"/>
<CursorPos X="4" Y="1660"/>
<TopLine Value="1660"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit51>
<Unit52>
<Filename Value="common_gui_utils.pas"/>
@ -466,14 +456,14 @@
<UnitName Value="common_gui_utils"/>
<CursorPos X="2" Y="12"/>
<TopLine Value="1"/>
<UsageCount Value="89"/>
<UsageCount Value="104"/>
</Unit52>
<Unit53>
<Filename Value="..\..\..\..\..\DOCUME~1\ADMINI~1\LOCALS~1\Temp\DestBug.pas"/>
<UnitName Value="DestBug"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="6"/>
<UsageCount Value="5"/>
</Unit53>
<Unit54>
<Filename Value="uargedit.pas"/>
@ -483,20 +473,20 @@
<UnitName Value="uargedit"/>
<CursorPos X="2" Y="12"/>
<TopLine Value="1"/>
<UsageCount Value="82"/>
<UsageCount Value="97"/>
</Unit54>
<Unit55>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\lcl\interfaces\win32\win32wscontrols.pp"/>
<UnitName Value="Win32WSControls"/>
<CursorPos X="1" Y="226"/>
<TopLine Value="212"/>
<UsageCount Value="7"/>
<UsageCount Value="6"/>
</Unit55>
<Unit56>
<Filename Value="umain.lfm"/>
<CursorPos X="19" Y="1822"/>
<TopLine Value="1858"/>
<UsageCount Value="7"/>
<UsageCount Value="6"/>
<SyntaxHighlighter Value="LFM"/>
</Unit56>
<Unit57>
@ -507,14 +497,14 @@
<UnitName Value="umoduleedit"/>
<CursorPos X="2" Y="12"/>
<TopLine Value="1"/>
<UsageCount Value="74"/>
<UsageCount Value="89"/>
</Unit57>
<Unit58>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\lcl\stdctrls.pp"/>
<UnitName Value="StdCtrls"/>
<CursorPos X="3" Y="1020"/>
<TopLine Value="1006"/>
<UsageCount Value="7"/>
<UsageCount Value="6"/>
</Unit58>
<Unit59>
<Filename Value="ubindingedit.pas"/>
@ -524,38 +514,38 @@
<UnitName Value="ubindingedit"/>
<CursorPos X="2" Y="12"/>
<TopLine Value="1"/>
<UsageCount Value="64"/>
<UsageCount Value="79"/>
</Unit59>
<Unit60>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpash.inc"/>
<CursorPos X="26" Y="158"/>
<TopLine Value="135"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit60>
<Unit61>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\objpas.inc"/>
<CursorPos X="11" Y="550"/>
<TopLine Value="645"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit61>
<Unit62>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\classes\classesh.inc"/>
<CursorPos X="14" Y="248"/>
<TopLine Value="226"/>
<UsageCount Value="8"/>
<CursorPos X="14" Y="697"/>
<TopLine Value="675"/>
<UsageCount Value="10"/>
</Unit62>
<Unit63>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\classes\lists.inc"/>
<CursorPos X="3" Y="408"/>
<TopLine Value="406"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit63>
<Unit64>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-base\src\inc\contnrs.pp"/>
<UnitName Value="contnrs"/>
<CursorPos X="3" Y="701"/>
<TopLine Value="698"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit64>
<Unit65>
<Filename Value="ufrmsaveoption.pas"/>
@ -565,42 +555,40 @@
<UnitName Value="ufrmsaveoption"/>
<CursorPos X="42" Y="64"/>
<TopLine Value="42"/>
<UsageCount Value="60"/>
<UsageCount Value="75"/>
</Unit65>
<Unit66>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\lcl\dialogs.pp"/>
<UnitName Value="Dialogs"/>
<CursorPos X="3" Y="44"/>
<TopLine Value="27"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit66>
<Unit67>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\packages\fcl-xml\src\dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="3" Y="1459"/>
<TopLine Value="1455"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit67>
<Unit68>
<Filename Value="..\wst_rtti_filter\cursor_intf.pas"/>
<UnitName Value="cursor_intf"/>
<CursorPos X="2" Y="90"/>
<TopLine Value="71"/>
<EditorIndex Value="15"/>
<UsageCount Value="24"/>
<Loaded Value="True"/>
</Unit68>
<Unit69>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\lcl\include\control.inc"/>
<CursorPos X="1" Y="2403"/>
<TopLine Value="2390"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit69>
<Unit70>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\lcl\include\customform.inc"/>
<CursorPos X="1" Y="1417"/>
<TopLine Value="1398"/>
<UsageCount Value="8"/>
<UsageCount Value="7"/>
</Unit70>
<Unit71>
<Filename Value="ufarrayedit.pas"/>
@ -610,9 +598,7 @@
<UnitName Value="ufarrayedit"/>
<CursorPos X="67" Y="117"/>
<TopLine Value="95"/>
<EditorIndex Value="9"/>
<UsageCount Value="44"/>
<Loaded Value="True"/>
<UsageCount Value="59"/>
</Unit71>
<Unit72>
<Filename Value="uftypealiasedit.pas"/>
@ -622,95 +608,195 @@
<UnitName Value="uftypealiasedit"/>
<CursorPos X="21" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
<UsageCount Value="50"/>
</Unit72>
<Unit73>
<Filename Value="..\..\..\..\..\Documents and Settings\Administrateur\Bureau\ACER\n\AWSECommerceService.pas"/>
<UnitName Value="AWSECommerceService"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="20"/>
<UsageCount Value="19"/>
</Unit73>
<Unit74>
<Filename Value="..\..\..\..\..\Documents and Settings\Administrateur\Bureau\ACER\n\AWSECommerceService_proxy.pas"/>
<UnitName Value="AWSECommerceService_proxy"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="20"/>
<UsageCount Value="19"/>
</Unit74>
<Unit75>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\typinfo.pp"/>
<UnitName Value="typinfo"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="22"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit75>
<Unit76>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysstrh.inc"/>
<CursorPos X="10" Y="84"/>
<TopLine Value="57"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit76>
<Unit77>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysansih.inc"/>
<CursorPos X="10" Y="24"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit77>
<Unit78>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\sysutils\sysansi.inc"/>
<CursorPos X="13" Y="51"/>
<TopLine Value="42"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit78>
<Unit79>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\systemh.inc"/>
<CursorPos X="11" Y="577"/>
<TopLine Value="562"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit79>
<Unit80>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\inc\astrings.inc"/>
<CursorPos X="3" Y="747"/>
<TopLine Value="742"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit80>
<Unit81>
<Filename Value="..\..\..\..\..\lazarus_23_215XX\fpc\source\rtl\objpas\classes\streams.inc"/>
<CursorPos X="7" Y="124"/>
<TopLine Value="117"/>
<UsageCount Value="10"/>
</Unit81>
<Unit82>
<Filename Value="..\wst_global.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit82>
</Units>
<JumpHistory Count="8" HistoryIndex="7">
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="..\ws_helper\generator.pas"/>
<Caret Line="1767" Column="30" TopLine="1750"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="542" Column="1" TopLine="527"/>
</Position1>
<Position2>
<Filename Value="..\ws_helper\generator.pas"/>
<Caret Line="1770" Column="68" TopLine="1755"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="664" Column="1" TopLine="649"/>
</Position2>
<Position3>
<Filename Value="typ_lib_edtr.lpr"/>
<Caret Line="21" Column="1" TopLine="1"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="538" Column="1" TopLine="523"/>
</Position3>
<Position4>
<Filename Value="..\ws_helper\pascal_parser_intf.pas"/>
<Caret Line="6" Column="71" TopLine="1"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="539" Column="1" TopLine="524"/>
</Position4>
<Position5>
<Filename Value="..\ws_helper\generator.pas"/>
<Caret Line="1767" Column="23" TopLine="1755"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="542" Column="1" TopLine="527"/>
</Position5>
<Position6>
<Filename Value="..\ws_helper\pascal_parser_intf.pas"/>
<Caret Line="274" Column="16" TopLine="268"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="664" Column="1" TopLine="649"/>
</Position6>
<Position7>
<Filename Value="..\ws_helper\generator.pas"/>
<Caret Line="1771" Column="29" TopLine="1755"/>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="538" Column="1" TopLine="523"/>
</Position7>
<Position8>
<Filename Value="typ_lib_edtr.lpr"/>
<Caret Line="11" Column="59" TopLine="1"/>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="209" Column="50" TopLine="190"/>
</Position8>
<Position9>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position9>
<Position10>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="63" Column="57" TopLine="40"/>
</Position10>
<Position11>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="80" Column="65" TopLine="58"/>
</Position11>
<Position12>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="132" Column="47" TopLine="110"/>
</Position12>
<Position13>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="133" Column="47" TopLine="111"/>
</Position13>
<Position14>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="188" Column="71" TopLine="166"/>
</Position14>
<Position15>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="669" Column="54" TopLine="647"/>
</Position15>
<Position16>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="680" Column="54" TopLine="673"/>
</Position16>
<Position17>
<Filename Value="typ_lib_edtr.lpr"/>
<Caret Line="21" Column="1" TopLine="1"/>
</Position17>
<Position18>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="209" Column="48" TopLine="190"/>
</Position18>
<Position19>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="234" Column="1" TopLine="219"/>
</Position19>
<Position20>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="663" Column="1" TopLine="648"/>
</Position20>
<Position21>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="664" Column="1" TopLine="649"/>
</Position21>
<Position22>
<Filename Value="..\ws_helper\pastree.pp"/>
<Caret Line="538" Column="1" TopLine="523"/>
</Position22>
<Position23>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="196" Column="25" TopLine="192"/>
</Position23>
<Position24>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position24>
<Position25>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="196" Column="25" TopLine="181"/>
</Position25>
<Position26>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="793" Column="32" TopLine="766"/>
</Position26>
<Position27>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position27>
<Position28>
<Filename Value="uwsttypelibraryedit.pas"/>
<Caret Line="234" Column="1" TopLine="201"/>
</Position28>
<Position29>
<Filename Value="..\ws_helper\pparser.pp"/>
<Caret Line="205" Column="1" TopLine="190"/>
</Position29>
<Position30>
<Filename Value="typ_lib_edtr.lpr"/>
<Caret Line="21" Column="1" TopLine="1"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>

View File

@ -230,9 +230,9 @@ begin
DoNotify(mtInfo,Format('File parsed %s .',[AFileName]));
except
on e : Exception do begin
FreeAndNil(Result);
DoNotify(mtError,e.Message);
raise;
FreeAndNil(Result);
//raise;
end;
end;
end;

View File

@ -10,11 +10,9 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
{$INCLUDE wst_global.inc}
unit wsdl_generator;
{$INCLUDE wst.inc}
interface
uses

View File

@ -17,11 +17,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
{$INCLUDE wst_global.inc}
unit generator;
{$mode objfpc}{$H+}
interface
uses
@ -149,6 +147,7 @@ type
FImpStream : ISourceStream;
FImpTempStream : ISourceStream;
FImpLastStream : ISourceStream;
FRttiFunc : ISourceStream;
private
function GenerateIntfName(AIntf : TPasElement):string;
@ -161,6 +160,7 @@ type
procedure GenerateClass(ASymbol : TPasClassType);
procedure GenerateEnum(ASymbol : TPasEnumType);
procedure GenerateArray(ASymbol : TPasArrayType);
procedure GenerateRecord(ASymbol : TPasRecordType);
procedure GenerateCustomMetadatas();
function GetDestUnitName():string;
@ -185,6 +185,7 @@ Const sPROXY_BASE_CLASS = 'TBaseProxy';
RETURN_VAL_NAME = 'returnVal';
sNAME_SPACE = 'sNAME_SPACE';
sUNIT_NAME = 'sUNIT_NAME';
sRECORD_RTTI_DEFINE = 'WST_RECORD_RTTI';
sPRM_NAME = 'strPrmName';
sLOC_SERIALIZER = 'locSerializer';
@ -1398,7 +1399,12 @@ begin
WriteLn('}');
WriteLn('unit %s;',[GetDestUnitName()]);
WriteLn('{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}');
WriteLn('{$IFDEF FPC}');
WriteLn(' {$mode objfpc} {$H+}');
WriteLn('{$ENDIF}');
WriteLn('{$IFNDEF FPC}');
WriteLn(' {$DEFINE WST_RECORD_RTTI}');
WriteLn('{$ENDIF}');
WriteLn('interface');
WriteLn('');
WriteLn('uses SysUtils, Classes, TypInfo, base_service_intf, service_intf;');
@ -1420,7 +1426,7 @@ begin
SetCurrentStream(FImpStream);
WriteLn('');
WriteLn('Implementation');
WriteLn('uses metadata_repository;');
WriteLn('uses metadata_repository, record_rtti, wst_types;');
FImpTempStream.WriteLn('initialization');
end;
@ -2033,6 +2039,122 @@ begin
end;
end;
procedure TInftGenerator.GenerateRecord(ASymbol : TPasRecordType);
var
strFieldList : string;
procedure WriteDec();
var
itm : TPasVariable;
i : PtrInt;
begin
SetCurrentStream(FDecStream);
NewLine();
IncIndent();
Indent(); WriteLn('%s = record',[ASymbol.Name]);
IncIndent();
strFieldList := '';
for i := 0 to Pred(ASymbol.Members.Count) do begin
itm := TPasVariable(ASymbol.Members[i]);
Indent();
WriteLn('%s : %s;',[itm.Name,itm.VarType.Name]);
if ( i > 0 ) then
strFieldList := Format('%s;%s',[strFieldList,itm.Name])
else
strFieldList := itm.Name;
end;
DecIndent();
Indent(); WriteLn('end;');
DecIndent();
end;
procedure WriteRTTI();
var
itm : TPasVariable;
k, c : PtrInt;
offsetLine, typeLine : string;
begin
SetCurrentStream(FRttiFunc);
NewLine();
WriteLn('{$IFDEF %s}',[sRECORD_RTTI_DEFINE]);
WriteLn('function __%s_TYPEINFO_FUNC__() : PTypeInfo;',[ASymbol.Name]);
WriteLn('var');
IncIndent();
Indent(); WriteLn('p : ^%s;',[ASymbol.Name]);
Indent(); WriteLn('r : %s;',[ASymbol.Name]);
DecIndent();
WriteLn('begin');
IncIndent();
Indent(); WriteLn('p := @r;');
Indent(); WriteLn('Result := MakeRawTypeInfo(');
IncIndent();
Indent(); WriteLn('%s,',[QuotedStr(ASymbol.Name)]);
Indent(); WriteLn('SizeOf(%s),',[ASymbol.Name]);
offsetLine := '[ ';
typeLine := '[ ';
c := ASymbol.Members.Count;
if ( c > 0 ) then begin
k := 1;
itm := TPasVariable(ASymbol.Members[(k-1)]);
offsetLine := offsetLine + Format('PtrUInt(@(p^.%s)) - PtrUInt(p)',[itm.Name]);
typeLine := typeLine + Format('TypeInfo(%s)',[itm.VarType.Name]);
Inc(k);
for k := k to c do begin
itm := TPasVariable(ASymbol.Members[(k-1)]);
offsetLine := offsetLine + Format(', PtrUInt(@(p^.%s)) - PtrUInt(p)',[itm.Name]);
typeLine := typeLine + Format(', TypeInfo(%s)',[itm.VarType.Name]);
end;
end;
offsetLine := offsetLine + ' ]';
typeLine := typeLine + ' ]';
Indent(); WriteLn('%s,',[offsetLine]);
Indent(); WriteLn('%s',[typeLine]);
DecIndent();
Indent(); WriteLn(');');
DecIndent();
WriteLn('end;');
WriteLn('{$ENDIF %s}',[sRECORD_RTTI_DEFINE]);
end;
var
s : string;
begin
try
WriteDec();
WriteRTTI();
SetCurrentStream(FImpLastStream);
NewLine();
Indent();
WriteLn(
'GetTypeRegistry().Register(%s,TypeInfo(%s),%s).RegisterExternalPropertyName(%s,%s);',
[ sNAME_SPACE,ASymbol.Name,QuotedStr(SymbolTable.GetExternalName(ASymbol)),
QuotedStr(Format('__FIELDS__',[ASymbol.Name])),QuotedStr(strFieldList)
]
);
s := 'GetTypeRegistry().ItemByTypeInfo[TypeInfo(%s)]' +
'.RegisterObject(' +
'FIELDS_STRING,' +
'TRecordRttiDataObject.Create(' +
'MakeRecordTypeInfo(%s),' +
'GetTypeRegistry().ItemByTypeInfo[TypeInfo(%s)].GetExternalPropertyName(''__FIELDS__'')' +
')' +
');';
WriteLn('{$IFNDEF %s}',[sRECORD_RTTI_DEFINE]);
Indent(); WriteLn(s,[ASymbol.Name,Format('TypeInfo(%s)',[ASymbol.Name]),ASymbol.Name]);
WriteLn('{$ENDIF %s}',[sRECORD_RTTI_DEFINE]);
WriteLn('{$IFDEF %s}',[sRECORD_RTTI_DEFINE]);
Indent(); WriteLn(s,[ASymbol.Name,Format('__%s_TYPEINFO_FUNC__()',[ASymbol.Name]),ASymbol.Name]);
WriteLn('{$ENDIF %s}',[sRECORD_RTTI_DEFINE]);
SetCurrentStream(FDecStream);
except
on e : Exception do
GetLogger.Log(mtError,'TInftGenerator.GenerateRecord()=', [ASymbol.Name, ' ;; ', e.Message]);
end;
end;
procedure TInftGenerator.GenerateCustomMetadatas();
procedure WriteOperationDatas(AInftDef : TPasClassType; AOp : TPasProcedure);
@ -2140,13 +2262,14 @@ begin
FImpStream := SrcMngr.CreateItem(GetDestUnitName() + '.imp');
FImpTempStream := SrcMngr.CreateItem(GetDestUnitName() + '.tmp_imp');
FImpLastStream := SrcMngr.CreateItem(GetDestUnitName() + '.tmp_imp_last');
FRttiFunc := SrcMngr.CreateItem(GetDestUnitName() + '.tmp_rtti_func');
FImpTempStream.IncIndent();
FImpLastStream.IncIndent();
end;
procedure TInftGenerator.Execute();
var
i,c, j, k : Integer;
i,c, j, k : PtrInt;
clssTyp : TPasClassType;
gnrClssLst : TObjectList;
objLst : TObjectList;
@ -2194,6 +2317,13 @@ begin
end;
end;
for i := 0 to c do begin
elt := TPasElement(typeList[i]);
if elt.InheritsFrom(TPasRecordType) then begin
GenerateRecord(TPasRecordType(elt));
end;
end;
for i := 0 to c do begin
elt := TPasElement(typeList[i]);
if elt.InheritsFrom(TPasAliasType) then begin
@ -2258,8 +2388,9 @@ begin
DecIndent();
GenerateCustomMetadatas();
FImpLastStream.NewLine();
GenerateUnitImplementationFooter();
FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FImpStream,FImpTempStream,FImpLastStream]);
FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FImpStream,FRttiFunc,FImpTempStream,FImpLastStream]);
FDecStream := nil;
FImpStream := nil;
FImpTempStream := nil;

View File

@ -451,7 +451,7 @@ begin
Result.SourceLinenumber := ASourceLinenumber;
if Result.InheritsFrom(TPasModule) then begin
FCurrentModule := Result as TPasModule;
Package.Modules.Add(Result);
//Package.Modules.Add(Result);
end;
end;

View File

@ -31,6 +31,10 @@ Type
EsourceException = class(Exception)
end;
ISourceStream = interface;
ISourceManager = interface;
ISavableSourceStream = interface;
ISourceStream = interface
['{91EA7DA6-340C-477A-A6FD-06F2BAEA9A97}']
function GetFileName():string;
@ -45,6 +49,7 @@ Type
procedure NewLine();
procedure BeginAutoIndent();
procedure EndAutoIndent();
procedure Append(ASource : ISavableSourceStream);
end;
ISourceManager = Interface
@ -98,6 +103,7 @@ type
procedure BeginAutoIndent();
procedure EndAutoIndent();
function IsInAutoInden():Boolean;
procedure Append(ASource : ISavableSourceStream);
Public
constructor Create(const AFileName:string);
destructor Destroy();override;
@ -303,6 +309,12 @@ begin
Result := ( FAutoIndentCount > 0 );
end;
procedure TSourceStream.Append(ASource : ISavableSourceStream);
begin
if ( ASource <> nil ) then
FStream.CopyFrom(ASource.GetStream(),0);
end;
constructor TSourceStream.Create(const AFileName: string);
begin
FFileName := AFileName;

View File

@ -3,8 +3,4 @@
const FPC_VERSION = 0;
{$ENDIF}
{$IFDEF FPC}
{$IF( (FPC_VERSION = 2) and (FPC_RELEASE > 0) ) }
{$define FPC_211}
{$IFEND}
{$ENDIF}

View File

@ -1,4 +1,4 @@
{$IFNDEF HAS_QWORD}
{$IFNDEF FPC}
type
QWord = type Int64;
DWORD = LongWord;

View File

@ -24,7 +24,7 @@ type
function CreateDoc() : TXMLDocument ;
procedure WriteXMLFile(ADoc : TXMLDocument; AStream : TStream);
procedure ReadXMLFile(ADoc : TXMLDocument; AStream : TStream);
procedure ReadXMLFile(out ADoc : TXMLDocument; AStream : TStream);
function NodeToBuffer(ANode : TDOMNode):string ;
function FilterList(const ALIst : IDOMNodeList; const ANodeName : widestring):IDOMNodeList ;
@ -55,8 +55,9 @@ begin
(ADoc as IDOMPersist).saveToStream(AStream);
end;
procedure ReadXMLFile(ADoc : TXMLDocument; AStream : TStream);
procedure ReadXMLFile(out ADoc : TXMLDocument; AStream : TStream);
begin
ADoc := CreateDoc();
(ADoc as IDOMPersist).loadFromStream(AStream);
end;

View File

@ -5,4 +5,16 @@
{$ELSE}
{$UNDEF HAS_QWORD}
{$UNDEF USE_INLINE}
{$DEFINE WST_RECORD_RTTI}
{$ENDIF}
{$IFDEF CPU86}
{$DEFINE HAS_COMP}
{$ENDIF}
{$IFDEF FPC}
{$IF Defined(FPC_VERSION) and (FPC_VERSION = 2) }
{$IF Defined(FPC_RELEASE) and (FPC_RELEASE > 0) }
{$define FPC_211}
{$IFEND}
{$IFEND}
{$ENDIF}

42
wst/trunk/wst_types.pas Normal file
View File

@ -0,0 +1,42 @@
{
This file is part of the Web Service Toolkit
Copyright (c) 2006 by Inoussa OUEDRAOGO
This file is provide under modified LGPL licence
( the files COPYING.modifiedLGPL and COPYING.LGPL).
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
{$INCLUDE wst_global.inc}
unit wst_types;
interface
{$INCLUDE wst.inc}
{$INCLUDE wst_delphi.inc}
type
{ TDataObject }
TDataObject = class
private
FData : Pointer;
public
constructor Create(const AData : Pointer);
property Data : Pointer read FData write FData;
end;
implementation
{ TDataObject }
constructor TDataObject.Create(const AData : Pointer);
begin
FData := AData;
end;
end.