You've already forked lazarus-ccr
Test for "record" marshaling.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3862 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,24 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
@ -31,185 +33,40 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="16">
|
||||
<Units Count="2">
|
||||
<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>
|
||||
</Unit1>
|
||||
</Units>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="record_client"/>
|
||||
</Target>
|
||||
<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\"/>
|
||||
<IncludeFiles Value="..\..;$(LazarusDir)\others_package\indy\indy-10.2.0.1\fpc\Inc"/>
|
||||
<OtherUnitFiles Value="..;..\..;..\..\.."/>
|
||||
<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>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<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"/>
|
||||
|
@ -5,8 +5,7 @@ program record_client;
|
||||
uses
|
||||
Classes, SysUtils, {$IFDEF WINDOWS}ActiveX,{$ENDIF}
|
||||
soap_formatter,
|
||||
synapse_http_protocol,
|
||||
//indy_http_protocol,
|
||||
fpc_http_protocol,
|
||||
metadata_repository,
|
||||
record_sample, record_sample_proxy;
|
||||
|
||||
@ -52,14 +51,13 @@ var
|
||||
locService : RecordService;
|
||||
A : RecordA;
|
||||
B : RecordB;
|
||||
C : RecordC;
|
||||
D, C : RecordC;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
CoInitialize(nil);
|
||||
try
|
||||
{$ENDIF}
|
||||
SYNAPSE_RegisterHTTP_Transport();
|
||||
//INDY_RegisterHTTP_Transport();
|
||||
FPC_RegisterHTTP_Transport();
|
||||
WriteLn('Web Services Toolkit Record sample');
|
||||
WriteLn('This sample demonstrates the Object Pascal "Record" support by WST');
|
||||
WriteLn();
|
||||
@ -86,16 +84,16 @@ begin
|
||||
WriteLn(' comment : ',B.comment);
|
||||
WriteLn();
|
||||
WriteLn;
|
||||
C := locService.AddRec(A,B,C);
|
||||
D := 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('Response ( D ) : ');
|
||||
WriteLn(' intField : ',D.intField);
|
||||
WriteLn(' RecordField.intField : ',D.RecordField.intField);
|
||||
WriteLn(' RecordField.singleField : ',D.RecordField.singleField);
|
||||
WriteLn(' RecordField.singleField : ',D.RecordField.comment);
|
||||
WriteLn(' RecordField.RecordField.fieldA : ',D.RecordField.RecordField.fieldA);
|
||||
WriteLn(' RecordField.RecordField.fieldB : ',D.RecordField.RecordField.fieldB);
|
||||
WriteLn(' RecordField.RecordField.comment : ',D.RecordField.RecordField.comment);
|
||||
WriteLn();
|
||||
|
||||
if ( UpperCase(ReadEntryStr('Continue ( Y/N ) :'))[1] <> 'Y' ) then
|
||||
|
@ -1,33 +1,81 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:record_sample" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:record_sample">
|
||||
<xsd:complexType name="RecordA" wst:wst_record="true">
|
||||
<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:element name="fieldA" type="xsd:int"/>
|
||||
<xsd:element name="fieldB" type="xsd:float"/>
|
||||
<xsd:element name="comment" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="RecordB" wst:wst_record="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="singleField" type="xsd:float"/>
|
||||
<xsd:element name="intField" type="xsd:int"/>
|
||||
<xsd:element name="comment" type="xsd:string"/>
|
||||
<xsd:element name="RecordField" type="tns:RecordA"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="RecordC" wst:wst_record="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="intField" type="xsd:int"/>
|
||||
<xsd:element name="RecordField" type="tns:RecordB"/>
|
||||
</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>
|
||||
<message name="Add">
|
||||
<part name="AValue" type="tns:RecordA"/>
|
||||
</message>
|
||||
<message name="AddResponse">
|
||||
<part name="result" type="tns:RecordB"/>
|
||||
</message>
|
||||
<message name="AddRec">
|
||||
<part name="AA" type="tns:RecordA"/>
|
||||
<part name="AB" type="tns:RecordB"/>
|
||||
<part name="AC" type="tns:RecordC"/>
|
||||
</message>
|
||||
<message name="AddRecResponse">
|
||||
<part name="result" type="tns:RecordC"/>
|
||||
</message>
|
||||
<portType name="RecordService">
|
||||
<document><GUID value="{E42B7653-4B50-4956-88B4-FBCEC57B667A}"/></document>
|
||||
<documentation>
|
||||
<GUID value="{4CB555BD-B523-49BD-8861-496497B081DD}"/>
|
||||
</documentation>
|
||||
<operation name="Add">
|
||||
<input message="tns:Add"/>
|
||||
<output message="tns:AddResponse"/>
|
||||
</operation>
|
||||
<operation name="AddRec">
|
||||
<input message="tns:AddRec"/>
|
||||
<output message="tns:AddRecResponse"/>
|
||||
</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>
|
||||
<input>
|
||||
<soap:body use="literal" namespace="urn:record_sample"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" namespace="urn:record_sample"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="AddRec">
|
||||
<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>
|
||||
<port name="RecordServicePort" binding="tns:RecordServiceBinding">
|
||||
<soap:address location="http://127.0.0.1:20000"/>
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
@ -2,15 +2,13 @@
|
||||
This unit has been produced by ws_helper.
|
||||
Input unit name : "record_sample".
|
||||
This unit name : "record_sample".
|
||||
Date : "26/08/2007 01:12:11".
|
||||
Date : "02/01/2015 23:42:08".
|
||||
}
|
||||
unit record_sample;
|
||||
{$IFDEF FPC}
|
||||
{$mode objfpc} {$H+}
|
||||
{$ENDIF}
|
||||
{$IFNDEF FPC}
|
||||
{$DEFINE WST_RECORD_RTTI}
|
||||
{$ENDIF}
|
||||
{$DEFINE WST_RECORD_RTTI}
|
||||
interface
|
||||
|
||||
uses SysUtils, Classes, TypInfo, base_service_intf, service_intf;
|
||||
@ -21,22 +19,35 @@ const
|
||||
|
||||
type
|
||||
|
||||
TRecordClass = class;
|
||||
|
||||
TRecordClass = class(TBaseComplexRemotable)
|
||||
private
|
||||
FfieldA : integer;
|
||||
FfieldB : Single;
|
||||
published
|
||||
property fieldA : integer read FfieldA write FfieldA;
|
||||
property fieldB : Single read FfieldB write FfieldB;
|
||||
RecordA = record
|
||||
fieldA : integer;
|
||||
fieldB : Single;
|
||||
comment : UnicodeString;
|
||||
end;
|
||||
|
||||
RecordB = record
|
||||
singleField : Single;
|
||||
intField : integer;
|
||||
comment : UnicodeString;
|
||||
RecordField : RecordA;
|
||||
end;
|
||||
|
||||
RecordC = record
|
||||
intField : integer;
|
||||
RecordField : RecordB;
|
||||
end;
|
||||
|
||||
RecordService = interface(IInvokable)
|
||||
['{E42B7653-4B50-4956-88B4-FBCEC57B667A}']
|
||||
['{4CB555BD-B523-49BD-8861-496497B081DD}']
|
||||
function Add(
|
||||
const AValue : TRecordClass
|
||||
):Int64;
|
||||
const AValue : RecordA
|
||||
):RecordB;
|
||||
function AddRec(
|
||||
const AA : RecordA;
|
||||
const AB : RecordB;
|
||||
const AC : RecordC
|
||||
):RecordC;
|
||||
end;
|
||||
|
||||
procedure Register_record_sample_ServiceMetadata();
|
||||
@ -84,12 +95,108 @@ begin
|
||||
'FORMAT_OutputEncodingStyle',
|
||||
'literal'
|
||||
);
|
||||
mm.SetOperationCustomData(
|
||||
sUNIT_NAME,
|
||||
'RecordService',
|
||||
'AddRec',
|
||||
'_E_N_',
|
||||
'AddRec'
|
||||
);
|
||||
mm.SetOperationCustomData(
|
||||
sUNIT_NAME,
|
||||
'RecordService',
|
||||
'AddRec',
|
||||
'FORMAT_Input_EncodingStyle',
|
||||
'literal'
|
||||
);
|
||||
mm.SetOperationCustomData(
|
||||
sUNIT_NAME,
|
||||
'RecordService',
|
||||
'AddRec',
|
||||
'FORMAT_OutputEncodingStyle',
|
||||
'literal'
|
||||
);
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
GetTypeRegistry().Register(sNAME_SPACE,TypeInfo(TRecordClass),'TRecordClass');
|
||||
|
||||
{$IFDEF WST_RECORD_RTTI}
|
||||
function __RecordA_TYPEINFO_FUNC__() : PTypeInfo;
|
||||
var
|
||||
p : ^RecordA;
|
||||
r : RecordA;
|
||||
begin
|
||||
p := @r;
|
||||
Result := MakeRawTypeInfo(
|
||||
'RecordA',
|
||||
SizeOf(RecordA),
|
||||
[ PtrUInt(@(p^.fieldA)) - PtrUInt(p), PtrUInt(@(p^.fieldB)) - PtrUInt(p), PtrUInt(@(p^.comment)) - PtrUInt(p) ],
|
||||
[ TypeInfo(integer), TypeInfo(Single), TypeInfo(UnicodeString) ]
|
||||
);
|
||||
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(UnicodeString), 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}
|
||||
var
|
||||
typeRegistryInstance : TTypeRegistry = nil;
|
||||
initialization
|
||||
typeRegistryInstance := GetTypeRegistry();
|
||||
|
||||
|
||||
|
||||
typeRegistryInstance.Register(sNAME_SPACE,TypeInfo(RecordA),'RecordA').RegisterExternalPropertyName('__FIELDS__','fieldA;fieldB;comment');
|
||||
{$IFNDEF WST_RECORD_RTTI}
|
||||
typeRegistryInstance.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}
|
||||
typeRegistryInstance.ItemByTypeInfo[TypeInfo(RecordA)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__RecordA_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordA)].GetExternalPropertyName('__FIELDS__')));
|
||||
{$ENDIF WST_RECORD_RTTI}
|
||||
|
||||
typeRegistryInstance.Register(sNAME_SPACE,TypeInfo(RecordB),'RecordB').RegisterExternalPropertyName('__FIELDS__','singleField;intField;comment;RecordField');
|
||||
{$IFNDEF WST_RECORD_RTTI}
|
||||
typeRegistryInstance.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}
|
||||
typeRegistryInstance.ItemByTypeInfo[TypeInfo(RecordB)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__RecordB_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordB)].GetExternalPropertyName('__FIELDS__')));
|
||||
{$ENDIF WST_RECORD_RTTI}
|
||||
|
||||
typeRegistryInstance.Register(sNAME_SPACE,TypeInfo(RecordC),'RecordC').RegisterExternalPropertyName('__FIELDS__','intField;RecordField');
|
||||
{$IFNDEF WST_RECORD_RTTI}
|
||||
typeRegistryInstance.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}
|
||||
typeRegistryInstance.ItemByTypeInfo[TypeInfo(RecordC)].RegisterObject(FIELDS_STRING,TRecordRttiDataObject.Create(MakeRecordTypeInfo(__RecordC_TYPEINFO_FUNC__()),GetTypeRegistry().ItemByTypeInfo[TypeInfo(RecordC)].GetExternalPropertyName('__FIELDS__')));
|
||||
{$ENDIF WST_RECORD_RTTI}
|
||||
|
||||
|
||||
End.
|
||||
|
@ -2,7 +2,7 @@
|
||||
This unit has been produced by ws_helper.
|
||||
Input unit name : "record_sample".
|
||||
This unit name : "record_sample_binder".
|
||||
Date : "26/08/2007 01:12:11".
|
||||
Date : "02/01/2015 23:42:08".
|
||||
}
|
||||
unit record_sample_binder;
|
||||
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}
|
||||
@ -10,16 +10,17 @@ 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;
|
||||
|
||||
type
|
||||
TRecordService_ServiceBinderFactory = class(TInterfacedObject,IItemFactory)
|
||||
private
|
||||
FInstance : IInterface;
|
||||
@ -43,17 +44,14 @@ var
|
||||
hasObjCntrl : Boolean;
|
||||
tmpObj : RecordService;
|
||||
callCtx : ICallContext;
|
||||
strPrmName : string;
|
||||
locStrPrmName : string;
|
||||
procName,trgName : string;
|
||||
AValue : TRecordClass;
|
||||
returnVal : Int64;
|
||||
AValue : RecordA;
|
||||
returnVal : RecordB;
|
||||
begin
|
||||
callCtx := AContext;
|
||||
Fillchar(AValue,SizeOf(TRecordClass),#0);
|
||||
|
||||
strPrmName := 'AValue'; AFormatter.Get(TypeInfo(TRecordClass),strPrmName,AValue);
|
||||
if Assigned(Pointer(AValue)) then
|
||||
callCtx.AddObjectToFree(TObject(AValue));
|
||||
locStrPrmName := 'AValue'; AFormatter.Get(TypeInfo(RecordA),locStrPrmName,AValue);
|
||||
|
||||
tmpObj := Self.GetFactory().CreateInstance() as RecordService;
|
||||
if Supports(tmpObj,ICallControl,cllCntrl) then
|
||||
@ -68,7 +66,51 @@ begin
|
||||
trgName := AFormatter.GetCallTarget();
|
||||
AFormatter.Clear();
|
||||
AFormatter.BeginCallResponse(procName,trgName);
|
||||
AFormatter.Put('result',TypeInfo(Int64),returnVal);
|
||||
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;
|
||||
locStrPrmName : string;
|
||||
procName,trgName : string;
|
||||
AA : RecordA;
|
||||
AB : RecordB;
|
||||
AC : RecordC;
|
||||
returnVal : RecordC;
|
||||
begin
|
||||
callCtx := AContext;
|
||||
|
||||
locStrPrmName := 'AA'; AFormatter.Get(TypeInfo(RecordA),locStrPrmName,AA);
|
||||
locStrPrmName := 'AB'; AFormatter.Get(TypeInfo(RecordB),locStrPrmName,AB);
|
||||
locStrPrmName := 'AC'; AFormatter.Get(TypeInfo(RecordC),locStrPrmName,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;
|
||||
@ -84,6 +126,7 @@ constructor TRecordService_ServiceBinder.Create();
|
||||
begin
|
||||
inherited Create(GetServiceImplementationRegistry().FindFactory('RecordService'));
|
||||
RegisterVerbHandler('Add',{$IFDEF FPC}@{$ENDIF}AddHandler);
|
||||
RegisterVerbHandler('AddRec',{$IFDEF FPC}@{$ENDIF}AddRecHandler);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -48,13 +48,16 @@ function TRecordService_ServiceImp.AddRec(
|
||||
const AB : RecordB;
|
||||
const AC : RecordC
|
||||
):RecordC;
|
||||
var
|
||||
h,m,s,ms : Word;
|
||||
Begin
|
||||
Result.RecordField.intField := 1234;
|
||||
Result.RecordField.RecordField.fieldA := 0;
|
||||
Result.RecordField.RecordField.fieldB := 0;
|
||||
DecodeTime(Now(),h,m,s,ms);
|
||||
Result.RecordField.intField := h;
|
||||
Result.RecordField.RecordField.fieldA := m;
|
||||
Result.RecordField.RecordField.fieldB := s;
|
||||
Result.intField := Trunc(AA.fieldA + AA.fieldB);
|
||||
Result.RecordField.singleField := AB.singleField + AB.intField;
|
||||
Result.RecordField.comment := 'Computed in AddRec().';
|
||||
Result.RecordField.RecordField.comment := 'Computed in AddRec().';
|
||||
End;
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
This unit has been produced by ws_helper.
|
||||
Input unit name : "record_sample".
|
||||
This unit name : "record_sample_proxy".
|
||||
Date : "26/08/2007 01:12:11".
|
||||
Date : "02/01/2015 23:42:08".
|
||||
}
|
||||
|
||||
Unit record_sample_proxy;
|
||||
@ -18,19 +18,29 @@ Type
|
||||
Protected
|
||||
class function GetServiceType() : PTypeInfo;override;
|
||||
function Add(
|
||||
const AValue : TRecordClass
|
||||
):Int64;
|
||||
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;
|
||||
Function wst_CreateInstance_RecordService(const AFormat : string = 'SOAP:'; const ATransport : string = 'HTTP:'; const AAddress : string = ''):RecordService;
|
||||
|
||||
Implementation
|
||||
uses wst_resources_imp, metadata_repository;
|
||||
|
||||
|
||||
Function wst_CreateInstance_RecordService(const AFormat : string; const ATransport : string):RecordService;
|
||||
Function wst_CreateInstance_RecordService(const AFormat : string; const ATransport : string; const AAddress : string):RecordService;
|
||||
Var
|
||||
locAdr : string;
|
||||
Begin
|
||||
Result := TRecordService_Proxy.Create('RecordService',AFormat+GetServiceDefaultFormatProperties(TypeInfo(RecordService)),ATransport + 'address=' + GetServiceDefaultAddress(TypeInfo(RecordService)));
|
||||
locAdr := AAddress;
|
||||
if ( locAdr = '' ) then
|
||||
locAdr := GetServiceDefaultAddress(TypeInfo(RecordService));
|
||||
Result := TRecordService_Proxy.Create('RecordService',AFormat+GetServiceDefaultFormatProperties(TypeInfo(RecordService)),ATransport + 'address=' + locAdr);
|
||||
End;
|
||||
|
||||
{ TRecordService_Proxy implementation }
|
||||
@ -41,23 +51,55 @@ begin
|
||||
end;
|
||||
|
||||
function TRecordService_Proxy.Add(
|
||||
const AValue : TRecordClass
|
||||
):Int64;
|
||||
const AValue : RecordA
|
||||
):RecordB;
|
||||
Var
|
||||
locSerializer : IFormatterClient;
|
||||
strPrmName : string;
|
||||
locCallContext : ICallContext;
|
||||
locStrPrmName : string;
|
||||
Begin
|
||||
locCallContext := Self as ICallContext;
|
||||
locSerializer := GetSerializer();
|
||||
Try
|
||||
locSerializer.BeginCall('Add', GetTarget(),(Self as ICallContext));
|
||||
locSerializer.Put('AValue', TypeInfo(TRecordClass), AValue);
|
||||
locSerializer.BeginCall('Add', GetTarget(),locCallContext);
|
||||
locSerializer.Put('AValue', TypeInfo(RecordA), AValue);
|
||||
locSerializer.EndCall();
|
||||
|
||||
MakeCall();
|
||||
|
||||
locSerializer.BeginCallRead((Self as ICallContext));
|
||||
strPrmName := 'result';
|
||||
locSerializer.Get(TypeInfo(Int64), strPrmName, Result);
|
||||
locSerializer.BeginCallRead(locCallContext);
|
||||
locStrPrmName := 'result';
|
||||
locSerializer.Get(TypeInfo(RecordB), locStrPrmName, Result);
|
||||
|
||||
Finally
|
||||
locSerializer.Clear();
|
||||
End;
|
||||
End;
|
||||
|
||||
function TRecordService_Proxy.AddRec(
|
||||
const AA : RecordA;
|
||||
const AB : RecordB;
|
||||
const AC : RecordC
|
||||
):RecordC;
|
||||
Var
|
||||
locSerializer : IFormatterClient;
|
||||
locCallContext : ICallContext;
|
||||
locStrPrmName : string;
|
||||
Begin
|
||||
locCallContext := Self as ICallContext;
|
||||
locSerializer := GetSerializer();
|
||||
Try
|
||||
locSerializer.BeginCall('AddRec', GetTarget(),locCallContext);
|
||||
locSerializer.Put('AA', TypeInfo(RecordA), AA);
|
||||
locSerializer.Put('AB', TypeInfo(RecordB), AB);
|
||||
locSerializer.Put('AC', TypeInfo(RecordC), AC);
|
||||
locSerializer.EndCall();
|
||||
|
||||
MakeCall();
|
||||
|
||||
locSerializer.BeginCallRead(locCallContext);
|
||||
locStrPrmName := 'result';
|
||||
locSerializer.Get(TypeInfo(RecordC), locStrPrmName, Result);
|
||||
|
||||
Finally
|
||||
locSerializer.Clear();
|
||||
|
@ -1,24 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<ActiveEditorIndexAtStart Value="7"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
@ -31,203 +33,57 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="18">
|
||||
<Units Count="5">
|
||||
<Unit0>
|
||||
<Filename Value="record_server.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="record_server"/>
|
||||
<CursorPos X="34" Y="16"/>
|
||||
<TopLine Value="4"/>
|
||||
<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="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="26"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<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>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<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="38" Y="1227"/>
|
||||
<TopLine Value="1216"/>
|
||||
<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="17" Y="21"/>
|
||||
<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>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<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>
|
||||
</Unit4>
|
||||
</Units>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="record_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="..\.."/>
|
||||
<OtherUnitFiles Value="..;..\..;..\..\..;..\..\..\wst_rtti_filter"/>
|
||||
<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>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Other>
|
||||
<CustomOptions Value="-dINDY_10
|
||||
-dUseCThreads
|
||||
"/>
|
||||
-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"/>
|
||||
|
@ -7,7 +7,7 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Classes, SysUtils,
|
||||
indy_http_server, metadata_service, server_listener,
|
||||
fpc_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;
|
||||
|
||||
@ -24,7 +24,7 @@ begin
|
||||
|
||||
//wst_CreateDefaultFile(wst_GetConfigFileName(),nil);
|
||||
|
||||
AppObject := TwstIndyHttpListener.Create('127.0.0.1',20000);
|
||||
AppObject := TwstFPHttpListener.Create('127.0.0.1',20000);
|
||||
try
|
||||
WriteLn('"Web Service Toolkit" HTTP Server sample listening at:');
|
||||
WriteLn('');
|
||||
|
@ -1,23 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<ActiveEditorIndexAtStart Value="2"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
@ -30,269 +33,31 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="12">
|
||||
<Units Count="2">
|
||||
<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"/>
|
||||
<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>
|
||||
</Unit1>
|
||||
</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"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="C:\Programmes\lazarus\wst\trunk\tests\record\"/>
|
||||
<OtherUnitFiles Value="..\..\.."/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
</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"/>
|
||||
|
@ -3,8 +3,7 @@ program test_record;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Classes, SysUtils
|
||||
,TypInfo, record_rtti;
|
||||
Classes, SysUtils, TypInfo, record_rtti;
|
||||
|
||||
type
|
||||
|
||||
|
Reference in New Issue
Block a user