You've already forked lazarus-ccr
ws_helper :
+ wst_CreateInstance_<service_name>(); new function to create a default proxy based on the address and params provided by the wsdl file. wst runtime : + GetServiceDefaultFormatProperties() + GetServiceDefaultAddress() git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@153 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -44,6 +44,7 @@ Type
|
||||
End;
|
||||
|
||||
function IsStrEmpty(Const AStr:String):Boolean;
|
||||
function ExtractOptionName(const ACompleteName : string):string;
|
||||
|
||||
implementation
|
||||
|
||||
@ -52,6 +53,20 @@ begin
|
||||
Result := ( Length(Trim(AStr)) = 0 );
|
||||
end;
|
||||
|
||||
function ExtractOptionName(const ACompleteName : string):string;
|
||||
var
|
||||
i, c : Integer;
|
||||
begin
|
||||
Result := '';
|
||||
c := Length(ACompleteName);
|
||||
for i := c downto 1 do begin
|
||||
if ( ACompleteName[i] = '_' ) then
|
||||
Break;
|
||||
Result := ACompleteName[i] + Result;
|
||||
end;
|
||||
Result := Trim(Result);
|
||||
end;
|
||||
|
||||
{ TPublishedPropertyManager }
|
||||
|
||||
procedure TPublishedPropertyManager.Error(const AMsg: string);
|
||||
|
@ -18,12 +18,14 @@ unit metadata_repository;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
Classes, SysUtils, TypInfo;
|
||||
|
||||
|
||||
const
|
||||
sWST_SIGNATURE = 'WST_METADATA_0.2.2.0';
|
||||
sWST_META = 'wst_meta';
|
||||
sFORMAT = 'FORMAT';
|
||||
sTRANSPORT = 'TRANSPORT';
|
||||
|
||||
type
|
||||
|
||||
@ -110,8 +112,64 @@ type
|
||||
|
||||
function Find(const AProps : PPropertyData; const APropName : string) : PPropertyData;
|
||||
|
||||
|
||||
function GetServiceDefaultAddress(AServiceTyp : PTypeInfo):string;
|
||||
function GetServiceDefaultFormatProperties(AServiceTyp : PTypeInfo):string;
|
||||
|
||||
implementation
|
||||
uses wst_resources_imp, binary_streamer;
|
||||
uses wst_resources_imp, binary_streamer, imp_utils;
|
||||
|
||||
const sADDRESS = 'Address';
|
||||
function GetServiceDefaultAddress(AServiceTyp : PTypeInfo):string;
|
||||
var
|
||||
typData : PTypeData;
|
||||
servcMdt : PService;
|
||||
propData : PPropertyData;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(AServiceTyp) and (AServiceTyp^.Kind = tkInterface) then begin
|
||||
typData := GetTypeData(AServiceTyp);
|
||||
if Assigned(typData) then begin
|
||||
servcMdt := GetModuleMetadataMngr().GetServiceMetadata(typData^.IntfUnit,AServiceTyp^.Name);
|
||||
if Assigned(AServiceTyp) then begin
|
||||
propData := Find(servcMdt^.Properties,sTRANSPORT + '_' + sADDRESS);
|
||||
if Assigned(propData) then
|
||||
Result := propData^.Data;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetServiceDefaultFormatProperties(AServiceTyp : PTypeInfo):string;
|
||||
var
|
||||
typData : PTypeData;
|
||||
servcMdt : PService;
|
||||
propData : PPropertyData;
|
||||
strName : string;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(AServiceTyp) and (AServiceTyp^.Kind = tkInterface) then begin
|
||||
typData := GetTypeData(AServiceTyp);
|
||||
if Assigned(typData) then begin
|
||||
servcMdt := GetModuleMetadataMngr().GetServiceMetadata(typData^.IntfUnit,AServiceTyp^.Name);
|
||||
if Assigned(AServiceTyp) then begin
|
||||
propData := servcMdt^.Properties;
|
||||
while Assigned(propData) do begin
|
||||
if ( AnsiPos(sFORMAT + '_',propData^.Name) = 1 ) then begin
|
||||
strName := ExtractOptionName(propData^.Name);
|
||||
if ( Length(strName) > 0 ) then begin
|
||||
Result := Format('%s%s=%s;',[Result,strName,propData^.Data]);
|
||||
end;
|
||||
end;
|
||||
propData := propData^.Next;
|
||||
end;
|
||||
if not IsStrEmpty(Result) then begin
|
||||
Delete(Result,Length(Result),1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ClearProperties(var AProps : PPropertyData);
|
||||
var
|
||||
@ -183,10 +241,10 @@ begin
|
||||
end else begin
|
||||
Result := Find(AProps,APropName);
|
||||
if not Assigned(Result) then begin
|
||||
AProps^.Next := GetMem(SizeOf(PPropertyData^));
|
||||
FillChar(AProps^.Next^,SizeOf(PPropertyData^),#0);
|
||||
Result := AProps^.Next;
|
||||
Result^.Next := nil;
|
||||
Result := GetMem(SizeOf(PPropertyData^));
|
||||
FillChar(Result^,SizeOf(PPropertyData^),#0);
|
||||
Result^.Next := AProps;
|
||||
AProps := Result;
|
||||
end;
|
||||
end;
|
||||
Result^.Name := APropName;
|
||||
|
@ -160,7 +160,7 @@ var
|
||||
sd : PService;
|
||||
opd : PServiceOperation;
|
||||
mm : IModuleMetadataMngr;
|
||||
strBuffer : string;
|
||||
strTransportBuffer, strFormatBuffer, strName : string;
|
||||
begin
|
||||
if not Assigned(FOperationsProperties) then begin
|
||||
FOperationsProperties := TStringList.Create();
|
||||
@ -170,15 +170,29 @@ begin
|
||||
Assert(Assigned(sd));
|
||||
for i := 0 to Pred(sd^.OperationsCount) do begin
|
||||
opd := @(sd^.Operations[i]);
|
||||
strBuffer := '';
|
||||
strFormatBuffer := '';
|
||||
strTransportBuffer := '';
|
||||
pd := opd^.Properties;
|
||||
while Assigned(pd) do begin
|
||||
strBuffer := Format('%s%s=%s;',[strBuffer,pd^.Name,pd^.Data]);
|
||||
strName := ExtractOptionName(pd^.Name);
|
||||
if ( AnsiPos(sFORMAT + '_',pd^.Name) = 1 ) then begin
|
||||
if ( Length(strName) > 0 ) then begin
|
||||
strFormatBuffer := Format('%s%s=%s;',[strFormatBuffer,strName,pd^.Data]);
|
||||
end;
|
||||
end else if ( AnsiPos(sTRANSPORT + '_',pd^.Name) = 1 ) then begin
|
||||
if ( Length(strName) > 0 ) then begin
|
||||
strTransportBuffer := Format('%s%s=%s;',[strTransportBuffer,strName,pd^.Data]);
|
||||
end;
|
||||
end;
|
||||
pd := pd^.Next;
|
||||
end;
|
||||
if not IsStrEmpty(strBuffer) then begin
|
||||
Delete(strBuffer,Length(strBuffer),1);
|
||||
FOperationsProperties.Values[opd^.Name] := strBuffer;
|
||||
if not IsStrEmpty(strFormatBuffer) then begin
|
||||
Delete(strFormatBuffer,Length(strFormatBuffer),1);
|
||||
FOperationsProperties.Values[opd^.Name + '_' + sFORMAT] := strFormatBuffer;
|
||||
end;
|
||||
if not IsStrEmpty(strTransportBuffer) then begin
|
||||
Delete(strTransportBuffer,Length(strTransportBuffer),1);
|
||||
FOperationsProperties.Values[opd^.Name + '_' + sTRANSPORT] := strTransportBuffer;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
@ -208,20 +222,29 @@ begin
|
||||
end;
|
||||
|
||||
procedure TBaseProxy.MakeCall();
|
||||
|
||||
procedure PrepareTransport();
|
||||
var
|
||||
trans : ITransport;
|
||||
frmt : IFormatterClient;
|
||||
|
||||
procedure PrepareCall();
|
||||
var
|
||||
strBuffer : string;
|
||||
strBuffer, strName : string;
|
||||
begin
|
||||
LoadProperties();
|
||||
strBuffer := FOperationsProperties.Values[GetSerializer().GetCallProcedureName()];
|
||||
strName := frmt.GetCallProcedureName() + '_';
|
||||
strBuffer := FOperationsProperties.Values[strName + sTRANSPORT];
|
||||
if not IsStrEmpty(strBuffer) then
|
||||
GetTransport().GetPropertyManager().SetProperties(strBuffer);
|
||||
trans.GetPropertyManager().SetProperties(strBuffer);
|
||||
strBuffer := FOperationsProperties.Values[strName + sFORMAT];
|
||||
if not IsStrEmpty(strBuffer) then
|
||||
frmt.GetPropertyManager().SetProperties(strBuffer);
|
||||
end;
|
||||
|
||||
begin
|
||||
PrepareTransport();
|
||||
GetCallHandler().MakeCall(GetSerializer(),GetTransport());
|
||||
trans := GetTransport();
|
||||
frmt := GetSerializer();
|
||||
PrepareCall();
|
||||
GetCallHandler().MakeCall(frmt,trans);
|
||||
end;
|
||||
|
||||
procedure TBaseProxy.AddObjectToFree(const AObject: TObject);
|
||||
|
@ -31,14 +31,14 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="21">
|
||||
<Units Count="23">
|
||||
<Unit0>
|
||||
<Filename Value="amazon.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="amazon"/>
|
||||
<CursorPos X="1" Y="17"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="82"/>
|
||||
<UsageCount Value="100"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="umain.pas"/>
|
||||
@ -46,20 +46,20 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="umain.lrs"/>
|
||||
<UnitName Value="umain"/>
|
||||
<CursorPos X="22" Y="67"/>
|
||||
<TopLine Value="58"/>
|
||||
<CursorPos X="34" Y="60"/>
|
||||
<TopLine Value="50"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="82"/>
|
||||
<UsageCount Value="100"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\files\free\AWSECommerceService.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="AWSECommerceService"/>
|
||||
<CursorPos X="36" Y="19399"/>
|
||||
<TopLine Value="19328"/>
|
||||
<CursorPos X="3" Y="19328"/>
|
||||
<TopLine Value="19324"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="82"/>
|
||||
<UsageCount Value="100"/>
|
||||
<Bookmarks Count="2">
|
||||
<Item0 X="5" Y="3387" ID="1"/>
|
||||
<Item1 X="12" Y="2429" ID="2"/>
|
||||
@ -69,138 +69,276 @@
|
||||
<Unit3>
|
||||
<Filename Value="..\..\base_service_intf.pas"/>
|
||||
<UnitName Value="base_service_intf"/>
|
||||
<CursorPos X="31" Y="2315"/>
|
||||
<TopLine Value="2305"/>
|
||||
<CursorPos X="21" Y="97"/>
|
||||
<TopLine Value="71"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="36"/>
|
||||
<UsageCount Value="45"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\..\service_intf.pas"/>
|
||||
<UnitName Value="service_intf"/>
|
||||
<CursorPos X="1" Y="567"/>
|
||||
<TopLine Value="527"/>
|
||||
<CursorPos X="1" Y="203"/>
|
||||
<TopLine Value="178"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="33"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="41" Y="178" ID="3"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="..\..\metadata_repository.pas"/>
|
||||
<UnitName Value="metadata_repository"/>
|
||||
<CursorPos X="24" Y="410"/>
|
||||
<TopLine Value="394"/>
|
||||
<UsageCount Value="8"/>
|
||||
<CursorPos X="78" Y="117"/>
|
||||
<TopLine Value="148"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="19"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="..\..\wst_resources_imp.pas"/>
|
||||
<UnitName Value="wst_resources_imp"/>
|
||||
<CursorPos X="3" Y="182"/>
|
||||
<TopLine Value="183"/>
|
||||
<UsageCount Value="7"/>
|
||||
<UsageCount Value="6"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="..\files\free\AWSECommerceService_proxy.pas"/>
|
||||
<UnitName Value="AWSECommerceService_proxy"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="31"/>
|
||||
<CursorPos X="1" Y="86"/>
|
||||
<TopLine Value="84"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="40"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="..\..\soap_formatter.pas"/>
|
||||
<UnitName Value="soap_formatter"/>
|
||||
<CursorPos X="1" Y="263"/>
|
||||
<CursorPos X="10" Y="254"/>
|
||||
<TopLine Value="221"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="29"/>
|
||||
<Loaded Value="True"/>
|
||||
<UsageCount Value="37"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||
<UnitName Value="synapse_http_protocol"/>
|
||||
<CursorPos X="3" Y="16"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="14"/>
|
||||
<CursorPos X="1" Y="151"/>
|
||||
<TopLine Value="140"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="17"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<UnitName Value="imp_utils"/>
|
||||
<CursorPos X="1" Y="86"/>
|
||||
<TopLine Value="73"/>
|
||||
<UsageCount Value="29"/>
|
||||
<CursorPos X="15" Y="13"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="36"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="..\..\base_soap_formatter.pas"/>
|
||||
<UnitName Value="base_soap_formatter"/>
|
||||
<CursorPos X="3" Y="1137"/>
|
||||
<TopLine Value="1162"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="29"/>
|
||||
<Loaded Value="True"/>
|
||||
<CursorPos X="3" Y="28"/>
|
||||
<TopLine Value="7"/>
|
||||
<UsageCount Value="37"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\typinfo.pp"/>
|
||||
<UnitName Value="typinfo"/>
|
||||
<CursorPos X="3" Y="925"/>
|
||||
<TopLine Value="921"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="..\..\ics_http_protocol.pas"/>
|
||||
<UnitName Value="ics_http_protocol"/>
|
||||
<CursorPos X="1" Y="183"/>
|
||||
<TopLine Value="161"/>
|
||||
<UsageCount Value="15"/>
|
||||
<UsageCount Value="14"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\dom.pp"/>
|
||||
<UnitName Value="DOM"/>
|
||||
<CursorPos X="15" Y="269"/>
|
||||
<TopLine Value="256"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="..\..\..\..\..\lazarusClean\others_package\ics\latest_distr\Delphi\Vc32\HttpProt.pas"/>
|
||||
<UnitName Value="HttpProt"/>
|
||||
<CursorPos X="1" Y="2555"/>
|
||||
<TopLine Value="2544"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstrh.inc"/>
|
||||
<CursorPos X="10" Y="112"/>
|
||||
<TopLine Value="91"/>
|
||||
<UsageCount Value="9"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="..\..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-xml\src\dom.pp"/>
|
||||
<UnitName Value="DOM"/>
|
||||
<CursorPos X="17" Y="302"/>
|
||||
<TopLine Value="289"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="..\..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\i386\i386.inc"/>
|
||||
<CursorPos X="2" Y="1284"/>
|
||||
<TopLine Value="1245"/>
|
||||
<CursorPos X="3" Y="1284"/>
|
||||
<TopLine Value="1270"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="..\..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\except.inc"/>
|
||||
<CursorPos X="1" Y="203"/>
|
||||
<TopLine Value="172"/>
|
||||
<CursorPos X="1" Y="223"/>
|
||||
<TopLine Value="210"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="..\..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\typinfo.pp"/>
|
||||
<UnitName Value="typinfo"/>
|
||||
<CursorPos X="1" Y="483"/>
|
||||
<TopLine Value="470"/>
|
||||
<UsageCount Value="10"/>
|
||||
<CursorPos X="68" Y="116"/>
|
||||
<TopLine Value="115"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="..\..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\objpas.inc"/>
|
||||
<CursorPos X="1" Y="58"/>
|
||||
<TopLine Value="45"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="..\..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\i386\setjump.inc"/>
|
||||
<CursorPos X="3" Y="36"/>
|
||||
<TopLine Value="20"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit22>
|
||||
</Units>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="183" Column="1" TopLine="162"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="105" Column="2" TopLine="85"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="86" Column="1" TopLine="73"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="105" Column="1" TopLine="92"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="105" Column="1" TopLine="92"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\..\service_intf.pas"/>
|
||||
<Caret Line="252" Column="1" TopLine="239"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\..\service_intf.pas"/>
|
||||
<Caret Line="253" Column="1" TopLine="240"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||
<Caret Line="151" Column="1" TopLine="157"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="86" Column="1" TopLine="73"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="72" Column="43" TopLine="58"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\files\free\AWSECommerceService.pas"/>
|
||||
<Caret Line="24" Column="75" TopLine="19"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\..\metadata_repository.pas"/>
|
||||
<Caret Line="215" Column="13" TopLine="196"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="86" Column="1" TopLine="73"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\..\metadata_repository.pas"/>
|
||||
<Caret Line="171" Column="1" TopLine="151"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\..\imp_utils.pas"/>
|
||||
<Caret Line="47" Column="67" TopLine="31"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\..\metadata_repository.pas"/>
|
||||
<Caret Line="158" Column="41" TopLine="145"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="72" Column="43" TopLine="58"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\files\free\AWSECommerceService_proxy.pas"/>
|
||||
<Caret Line="86" Column="219" TopLine="73"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="65" Column="34" TopLine="60"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="54" Column="21" TopLine="42"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="43" Column="24" TopLine="31"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\files\free\AWSECommerceService_proxy.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\files\free\AWSECommerceService.pas"/>
|
||||
<Caret Line="2" Column="68" TopLine="1"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="43" Column="24" TopLine="31"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="122" Column="1" TopLine="100"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="110" Column="8" TopLine="100"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="114" Column="1" TopLine="96"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="25" Column="45" TopLine="17"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="32" Column="14" TopLine="17"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="60" Column="34" TopLine="50"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
@ -224,7 +362,7 @@
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<BreakPoints Count="18">
|
||||
<BreakPoints Count="19">
|
||||
<Item1>
|
||||
<Source Value="..\google_api\home\inoussa\Projets\Laz\tests\soap\test_soap.pas"/>
|
||||
<Line Value="15"/>
|
||||
@ -282,21 +420,25 @@
|
||||
<Line Value="909"/>
|
||||
</Item14>
|
||||
<Item15>
|
||||
<Source Value="..\files\free\AWSECommerceService_proxy.pas"/>
|
||||
<Line Value="131"/>
|
||||
<Source Value="..\..\base_service_intf.pas"/>
|
||||
<Line Value="1698"/>
|
||||
</Item15>
|
||||
<Item16>
|
||||
<Source Value="..\..\base_service_intf.pas"/>
|
||||
<Line Value="1698"/>
|
||||
<Line Value="1699"/>
|
||||
</Item16>
|
||||
<Item17>
|
||||
<Source Value="..\..\base_service_intf.pas"/>
|
||||
<Line Value="1699"/>
|
||||
<Line Value="3662"/>
|
||||
</Item17>
|
||||
<Item18>
|
||||
<Source Value="..\..\base_service_intf.pas"/>
|
||||
<Line Value="3662"/>
|
||||
<Source Value="..\..\service_intf.pas"/>
|
||||
<Line Value="253"/>
|
||||
</Item18>
|
||||
<Item19>
|
||||
<Source Value="..\..\service_intf.pas"/>
|
||||
<Line Value="250"/>
|
||||
</Item19>
|
||||
</BreakPoints>
|
||||
<Watches Count="2">
|
||||
<Item1>
|
||||
|
@ -38,7 +38,8 @@ var
|
||||
implementation
|
||||
uses soap_formatter,
|
||||
synapse_http_protocol,
|
||||
AWSECommerceService_proxy;
|
||||
AWSECommerceService_proxy,
|
||||
metadata_repository;
|
||||
|
||||
{ TfMain }
|
||||
|
||||
@ -48,11 +49,7 @@ var
|
||||
rqst : ItemSearch_Type;
|
||||
rsps : ItemSearchResponse_Type;
|
||||
rspsItem : Items_Type;
|
||||
i, j, k, l : Integer;
|
||||
locSearchBinSets : SearchBinSets_Type;
|
||||
locSrchBinSet : SearchBinSet_Type;
|
||||
locBin : Bin_Type;
|
||||
bp : Bin_BinParameter_Type;
|
||||
i, j, k : Integer;
|
||||
itm : Item_Type;
|
||||
begin
|
||||
mmoRes.Clear();
|
||||
@ -60,11 +57,7 @@ begin
|
||||
rqst := ItemSearch_Type.Create();
|
||||
try
|
||||
Screen.Cursor := crHourGlass;
|
||||
locService := TAWSECommerceServicePortType_Proxy.Create(
|
||||
'AWSECommerceServicePortType',
|
||||
'SOAP:style=document;EncodingStyle=Literal',
|
||||
'http:address=http://soap.amazon.com/onca/soap?Service=AWSECommerceService'
|
||||
);
|
||||
locService := wst_CreateInstance_AWSECommerceServicePortType();
|
||||
rqst.AWSAccessKeyId := edtAccessID.Text;
|
||||
rqst.Request.SetLength(1);
|
||||
rqst.Request[0].Manufacturer := edtManufacturer.Text;
|
||||
@ -106,6 +99,7 @@ begin
|
||||
mmoRes.Lines.Add('');
|
||||
end;
|
||||
end;
|
||||
mmoRes.SelStart := 0;
|
||||
end else begin
|
||||
ShowMessage('not Assigned(rsps)');
|
||||
end;
|
||||
@ -117,10 +111,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
{$I umain.lrs}
|
||||
|
||||
Register_AWSECommerceService_ServiceMetadata();
|
||||
SYNAPSE_RegisterHTTP_Transport();
|
||||
|
||||
end.
|
||||
|
@ -69,6 +69,7 @@ type
|
||||
TProxyGenerator = class(TBaseGenerator)
|
||||
Private
|
||||
FDecStream : ISourceStream;
|
||||
FDecProcStream : ISourceStream;
|
||||
FImpStream : ISourceStream;
|
||||
|
||||
function GenerateClassName(AIntf : TInterfaceDefinition):String;
|
||||
@ -246,6 +247,7 @@ constructor TProxyGenerator.Create(
|
||||
begin
|
||||
Inherited Create(ASymTable,ASrcMngr);
|
||||
FDecStream := SrcMngr.CreateItem(GetDestUnitName() + '.dec');
|
||||
FDecProcStream := SrcMngr.CreateItem(GetDestUnitName() + '.dec_proc');
|
||||
FImpStream := SrcMngr.CreateItem(GetDestUnitName() + '.imp');
|
||||
end;
|
||||
|
||||
@ -265,7 +267,7 @@ begin
|
||||
End;
|
||||
End;
|
||||
GenerateUnitImplementationFooter();
|
||||
FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FImpStream]);
|
||||
FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FDecProcStream,FImpStream]);
|
||||
FDecStream := Nil;
|
||||
FImpStream := Nil;
|
||||
end;
|
||||
@ -276,10 +278,19 @@ begin
|
||||
end;
|
||||
|
||||
procedure TProxyGenerator.GenerateProxyIntf(AIntf: TInterfaceDefinition);
|
||||
|
||||
procedure WriteDec();
|
||||
begin
|
||||
Indent();
|
||||
WriteLn('%s=class(%s,%s)',[GenerateClassName(AIntf),sPROXY_BASE_CLASS,AIntf.Name]);
|
||||
FDecProcStream.IncIndent();
|
||||
try
|
||||
FDecProcStream.NewLine();
|
||||
FDecProcStream.Indent();
|
||||
FDecProcStream.WriteLn('Function wst_CreateInstance_%s(const AFormat : string = %s; const ATransport : string = %s):%s;',[AIntf.Name,QuotedStr('SOAP:'),QuotedStr('HTTP:'),AIntf.Name]);
|
||||
finally
|
||||
FDecProcStream.DecIndent();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure WriteMethod(AMthd : TMethodDefinition);
|
||||
@ -352,6 +363,24 @@ Var
|
||||
|
||||
procedure WriteDec();
|
||||
begin
|
||||
NewLine();
|
||||
WriteLn('Function wst_CreateInstance_%s(const AFormat : string; const ATransport : string):%s;',[AIntf.Name,AIntf.Name]);
|
||||
WriteLn('Begin');
|
||||
IncIndent();
|
||||
try
|
||||
Indent();
|
||||
WriteLn(
|
||||
'Result := %s.Create(%s,AFormat+%s,ATransport + %s);',
|
||||
[ strClassName,QuotedStr(AIntf.Name),
|
||||
Format('GetServiceDefaultFormatProperties(TypeInfo(%s))',[AIntf.Name]),
|
||||
QuotedStr('address=') + Format(' + GetServiceDefaultAddress(TypeInfo(%s))',[AIntf.Name])
|
||||
]
|
||||
);
|
||||
finally
|
||||
DecIndent();
|
||||
end;
|
||||
WriteLn('End;');
|
||||
NewLine();
|
||||
If ( AIntf.MethodCount > 0 ) Then
|
||||
WriteLn('{ %s implementation }',[strClassName]);
|
||||
end;
|
||||
@ -1302,7 +1331,7 @@ procedure TInftGenerator.GenerateIntf(AIntf: TInterfaceDefinition);
|
||||
procedure WriteDec();
|
||||
begin
|
||||
Indent();
|
||||
WriteLn('%s = interface',[GenerateIntfName(AIntf)]);
|
||||
WriteLn('%s = interface(IInvokable)',[GenerateIntfName(AIntf)]);
|
||||
if not IsStrEmpty(AIntf.InterfaceGUID) then begin
|
||||
Indent();Indent();WriteLn('[%s]',[QuotedStr(AIntf.InterfaceGUID)]);
|
||||
end;
|
||||
@ -1839,7 +1868,7 @@ procedure TInftGenerator.GenerateCustomMetadatas();
|
||||
IncIndent();
|
||||
Indent(); WriteLn('%s,',[sUNIT_NAME]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr('Address')]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr('TRANSPORT_Address')]);
|
||||
Indent(); WriteLn('%s' ,[QuotedStr(AIntf.Address)]);
|
||||
DecIndent();
|
||||
Indent();WriteLn(');');
|
||||
@ -1850,7 +1879,7 @@ procedure TInftGenerator.GenerateCustomMetadatas();
|
||||
IncIndent();
|
||||
Indent(); WriteLn('%s,',[sUNIT_NAME]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr('SoapDocumentStyle')]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr('FORMAT_Style')]);
|
||||
Indent(); WriteLn('%s' ,[QuotedStr('rpc')]);
|
||||
DecIndent();
|
||||
Indent();WriteLn(');');
|
||||
@ -1859,7 +1888,7 @@ procedure TInftGenerator.GenerateCustomMetadatas();
|
||||
IncIndent();
|
||||
Indent(); WriteLn('%s,',[sUNIT_NAME]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr('SoapDocumentStyle')]);
|
||||
Indent(); WriteLn('%s,',[QuotedStr('FORMAT_Style')]);
|
||||
Indent(); WriteLn('%s' ,[QuotedStr('document')]);
|
||||
DecIndent();
|
||||
Indent();WriteLn(');');
|
||||
|
@ -12,7 +12,7 @@
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<ActiveEditorIndexAtStart Value="1"/>
|
||||
<ActiveEditorIndexAtStart Value="3"/>
|
||||
</General>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
@ -33,16 +33,14 @@
|
||||
<PackageName Value="FCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="40">
|
||||
<Units Count="33">
|
||||
<Unit0>
|
||||
<Filename Value="ws_helper.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ws_helper"/>
|
||||
<CursorPos X="1" Y="122"/>
|
||||
<TopLine Value="35"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="ws_parser.pas"/>
|
||||
@ -58,14 +56,14 @@
|
||||
<Filename Value="generator.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="generator"/>
|
||||
<CursorPos X="3" Y="1581"/>
|
||||
<TopLine Value="1424"/>
|
||||
<CursorPos X="15" Y="161"/>
|
||||
<TopLine Value="139"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Bookmarks Count="3">
|
||||
<Item0 X="69" Y="860" ID="1"/>
|
||||
<Item1 X="17" Y="220" ID="2"/>
|
||||
<Item2 X="23" Y="1871" ID="4"/>
|
||||
<Item0 X="69" Y="889" ID="1"/>
|
||||
<Item1 X="17" Y="221" ID="2"/>
|
||||
<Item2 X="23" Y="1900" ID="4"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
@ -96,7 +94,7 @@
|
||||
<Filename Value="ws_helper.lpi"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="6"/>
|
||||
<SyntaxHighlighter Value="None"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
@ -104,21 +102,21 @@
|
||||
<UnitName Value="Classes"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="6"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="usr\share\fpcsrc\rtl\objpas\strutils.pp"/>
|
||||
<UnitName Value="strutils"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="6"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="usr\share\fpcsrc\rtl\unix\sysutils.pp"/>
|
||||
<UnitName Value="sysutils"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="6"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="source_utils.pas"/>
|
||||
@ -133,19 +131,19 @@
|
||||
<UnitName Value="strutils"/>
|
||||
<CursorPos X="23" Y="246"/>
|
||||
<TopLine Value="246"/>
|
||||
<UsageCount Value="3"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\sysutils\sysstrh.inc"/>
|
||||
<CursorPos X="10" Y="74"/>
|
||||
<TopLine Value="70"/>
|
||||
<UsageCount Value="3"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\sysutils\sysstr.inc"/>
|
||||
<CursorPos X="3" Y="185"/>
|
||||
<TopLine Value="180"/>
|
||||
<UsageCount Value="3"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="command_line_parser.pas"/>
|
||||
@ -184,166 +182,243 @@
|
||||
<UnitName Value="Classes"/>
|
||||
<CursorPos X="1" Y="47"/>
|
||||
<TopLine Value="5"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutilh.inc"/>
|
||||
<CursorPos X="13" Y="178"/>
|
||||
<TopLine Value="163"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="..\wsdl_to_pascal\wsdl2pas_imp.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="wsdl2pas_imp"/>
|
||||
<CursorPos X="29" Y="1641"/>
|
||||
<TopLine Value="1633"/>
|
||||
<UsageCount Value="201"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="..\wst_rtti_filter\rtti_filters.pas"/>
|
||||
<UnitName Value="rtti_filters"/>
|
||||
<CursorPos X="1" Y="564"/>
|
||||
<TopLine Value="543"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="57"/>
|
||||
<UsageCount Value="65"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="..\wst_rtti_filter\dom_cursors.pas"/>
|
||||
<UnitName Value="dom_cursors"/>
|
||||
<CursorPos X="24" Y="71"/>
|
||||
<TopLine Value="4"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="91"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="..\wst_rtti_filter\dom_cursors.pas"/>
|
||||
<UnitName Value="dom_cursors"/>
|
||||
<CursorPos X="1" Y="172"/>
|
||||
<TopLine Value="151"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="83"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="..\wst_rtti_filter\cursor_intf.pas"/>
|
||||
<UnitName Value="cursor_intf"/>
|
||||
<CursorPos X="1" Y="113"/>
|
||||
<TopLine Value="97"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="85"/>
|
||||
<UsageCount Value="93"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstrh.inc"/>
|
||||
<CursorPos X="10" Y="100"/>
|
||||
<TopLine Value="86"/>
|
||||
<UsageCount Value="24"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\dom.pp"/>
|
||||
<UnitName Value="DOM"/>
|
||||
<CursorPos X="3" Y="1387"/>
|
||||
<TopLine Value="1385"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<UsageCount Value="22"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\classesh.inc"/>
|
||||
<CursorPos X="14" Y="151"/>
|
||||
<TopLine Value="137"/>
|
||||
<UsageCount Value="3"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<UnitName Value="wsdl2pas_imp"/>
|
||||
<CursorPos X="63" Y="1815"/>
|
||||
<TopLine Value="1791"/>
|
||||
<CursorPos X="28" Y="639"/>
|
||||
<TopLine Value="635"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="76"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="21" Y="659" ID="3"/>
|
||||
<UsageCount Value="84"/>
|
||||
<Bookmarks Count="2">
|
||||
<Item0 X="21" Y="732" ID="3"/>
|
||||
<Item1 X="50" Y="633" ID="5"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutils.inc"/>
|
||||
<CursorPos X="3" Y="567"/>
|
||||
<TopLine Value="565"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\xmlread.pp"/>
|
||||
<UnitName Value="XMLRead"/>
|
||||
<CursorPos X="3" Y="954"/>
|
||||
<TopLine Value="928"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\win32\classes.pp"/>
|
||||
<UnitName Value="Classes"/>
|
||||
<CursorPos X="11" Y="43"/>
|
||||
<TopLine Value="20"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\win\wininc\messages.inc"/>
|
||||
<CursorPos X="6" Y="1219"/>
|
||||
<TopLine Value="639"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\classes\classes.inc"/>
|
||||
<CursorPos X="24" Y="20"/>
|
||||
<TopLine Value="13"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\classes\classesh.inc"/>
|
||||
<CursorPos X="26" Y="301"/>
|
||||
<TopLine Value="286"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit32>
|
||||
<Unit33>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\objpash.inc"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="319"/>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit33>
|
||||
<Unit34>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\getopts.pp"/>
|
||||
<UnitName Value="getopts"/>
|
||||
<CursorPos X="49" Y="203"/>
|
||||
<TopLine Value="10"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<CursorPos X="1" Y="231"/>
|
||||
<TopLine Value="218"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-xml\src\dom.pp"/>
|
||||
<UnitName Value="DOM"/>
|
||||
<CursorPos X="27" Y="41"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit35>
|
||||
<Unit36>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-base\src\inc\avl_tree.pp"/>
|
||||
<UnitName Value="AVL_Tree"/>
|
||||
<CursorPos X="54" Y="156"/>
|
||||
<TopLine Value="332"/>
|
||||
<UsageCount Value="3"/>
|
||||
</Unit36>
|
||||
<Unit37>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\inc\contnrs.pp"/>
|
||||
<UnitName Value="contnrs"/>
|
||||
<CursorPos X="30" Y="685"/>
|
||||
<TopLine Value="683"/>
|
||||
<UsageCount Value="3"/>
|
||||
</Unit37>
|
||||
<Unit38>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\lists.inc"/>
|
||||
<CursorPos X="3" Y="29"/>
|
||||
<TopLine Value="27"/>
|
||||
<UsageCount Value="3"/>
|
||||
</Unit38>
|
||||
<Unit39>
|
||||
<UsageCount Value="1"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstr.inc"/>
|
||||
<CursorPos X="1" Y="689"/>
|
||||
<TopLine Value="686"/>
|
||||
<UsageCount Value="24"/>
|
||||
</Unit39>
|
||||
<UsageCount Value="22"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\sysutils\syswideh.inc"/>
|
||||
<CursorPos X="10" Y="30"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\sysutils\syswide.inc"/>
|
||||
<CursorPos X="5" Y="92"/>
|
||||
<TopLine Value="90"/>
|
||||
<UsageCount Value="8"/>
|
||||
</Unit32>
|
||||
</Units>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="675" Column="69" TopLine="662"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="688" Column="50" TopLine="674"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="187" Column="54" TopLine="172"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="646" Column="36" TopLine="626"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="144" Column="55" TopLine="131"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="498" Column="26" TopLine="485"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="507" Column="69" TopLine="494"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="157" Column="15" TopLine="142"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="293" Column="23" TopLine="280"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="366" Column="23" TopLine="353"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="669" Column="25" TopLine="656"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="265" Column="22" TopLine="254"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="288" Column="30" TopLine="269"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="540" Column="26" TopLine="527"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="185" Column="58" TopLine="172"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="675" Column="69" TopLine="662"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="688" Column="50" TopLine="674"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="186" Column="67" TopLine="172"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="187" Column="67" TopLine="174"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="601" Column="41" TopLine="588"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="693" Column="35" TopLine="680"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="wsdl2pas_imp.pas"/>
|
||||
<Caret Line="186" Column="22" TopLine="173"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="16"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="generator.pas"/>
|
||||
<Caret Line="290" Column="59" TopLine="277"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\wst_rtti_filter\dom_cursors.pas"/>
|
||||
<Caret Line="172" Column="1" TopLine="151"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
@ -381,7 +456,7 @@
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<BreakPoints Count="3">
|
||||
<BreakPoints Count="4">
|
||||
<Item1>
|
||||
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
|
||||
<Line Value="230"/>
|
||||
@ -394,6 +469,10 @@
|
||||
<Source Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
|
||||
<Line Value="198"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Source Value="wsdl2pas_imp.pas"/>
|
||||
<Line Value="606"/>
|
||||
</Item4>
|
||||
</BreakPoints>
|
||||
<Watches Count="2">
|
||||
<Item1>
|
||||
|
@ -149,6 +149,7 @@ const
|
||||
s_attribute : WideString = 'attribute';
|
||||
s_base : WideString = 'base';
|
||||
s_binding : WideString = 'binding';
|
||||
s_body : WideString = 'body';
|
||||
s_complexContent : WideString = 'complexContent';
|
||||
s_complexType : WideString = 'complexType';
|
||||
s_document : WideString = 'document';
|
||||
@ -182,6 +183,9 @@ const
|
||||
s_simpleType : WideString = 'simpleType';
|
||||
s_soap : WideString = 'http://schemas.xmlsoap.org/wsdl/soap/';
|
||||
s_soapAction : WideString = 'soapAction';
|
||||
s_soapInputEncoding : WideString = 'Input_EncodingStyle';
|
||||
s_soapOutputEncoding : WideString = 'OutputEncodingStyle';
|
||||
s_soapStyle : WideString = 'style';
|
||||
s_style : WideString = 'style';
|
||||
s_targetNamespace : WideString = 'targetNamespace';
|
||||
s_type : WideString = 'type';
|
||||
@ -195,6 +199,8 @@ const
|
||||
//----------------------------------------------------------
|
||||
s_NODE_NAME = 'NodeName';
|
||||
s_NODE_VALUE = 'NodeValue';
|
||||
s_TRANSPORT = 'TRANSPORT';
|
||||
s_FORMAT = 'FORMAT';
|
||||
|
||||
type TCursorExposedType = ( cetRttiNode, cetDomNode );
|
||||
function CreateAttributesCursor(ANode : TDOMNode; const AExposedType : TCursorExposedType):IObjectCursor;
|
||||
@ -592,7 +598,62 @@ function TWsdlParser.ParsePortType(ANode, ABindingNode : TDOMNode) : TInterfaceD
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ParseOperationAtt_SoapAction(ABndngOpCurs : IObjectCursor; AOp : TMethodDefinition);
|
||||
procedure ParseOperation_EncodingStyle(ABndngOpCurs : IObjectCursor; AOp : TMethodDefinition);
|
||||
var
|
||||
nd, ndSoap : TDOMNode;
|
||||
tmpCrs, tmpSoapCrs, tmpXcrs : IObjectCursor;
|
||||
in_out_count : Integer;
|
||||
strBuffer : string;
|
||||
begin
|
||||
nd := FindNamedNode(ABndngOpCurs,AOp.ExternalName);
|
||||
if Assigned(nd) and nd.HasChildNodes() then begin
|
||||
tmpCrs := CreateCursorOn(
|
||||
CreateChildrenCursor(nd,cetRttiNode),
|
||||
ParseFilter(
|
||||
CreateQualifiedNameFilterStr(s_input,FWsdlShortNames) + ' or ' +
|
||||
CreateQualifiedNameFilterStr(s_output,FWsdlShortNames)
|
||||
,
|
||||
TDOMNodeRttiExposer
|
||||
)
|
||||
);
|
||||
tmpCrs.Reset();
|
||||
in_out_count := 0;
|
||||
while tmpCrs.MoveNext() and ( in_out_count < 2 ) do begin
|
||||
Inc(in_out_count);
|
||||
nd := (tmpCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject;
|
||||
if nd.HasChildNodes() then begin
|
||||
tmpSoapCrs := CreateCursorOn(
|
||||
CreateChildrenCursor(nd,cetRttiNode),
|
||||
ParseFilter(CreateQualifiedNameFilterStr(s_body,FSoapShortNames),TDOMNodeRttiExposer)
|
||||
);
|
||||
tmpSoapCrs.Reset();
|
||||
if tmpSoapCrs.MoveNext() then begin
|
||||
ndSoap := (tmpSoapCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject;
|
||||
if Assigned(ndSoap.Attributes) and ( ndSoap.Attributes.Length > 0 ) then begin
|
||||
tmpXcrs := CreateCursorOn(
|
||||
CreateAttributesCursor(ndSoap,cetRttiNode),
|
||||
ParseFilter(
|
||||
Format('%s = %s',[s_NODE_NAME,QuotedStr(s_use)]),
|
||||
TDOMNodeRttiExposer
|
||||
)
|
||||
);
|
||||
tmpXcrs.Reset();
|
||||
if tmpXcrs.MoveNext() then begin
|
||||
if AnsiSameText(s_input,ExtractNameFromQName(nd.NodeName)) then begin
|
||||
strBuffer := s_soapInputEncoding;
|
||||
end else begin
|
||||
strBuffer := s_soapOutputEncoding;
|
||||
end;
|
||||
AOp.Properties.Values[s_FORMAT + '_' + strBuffer] := (tmpXcrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject.NodeValue;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ParseOperationAttributes(ABndngOpCurs : IObjectCursor; AOp : TMethodDefinition);
|
||||
var
|
||||
nd : TDOMNode;
|
||||
tmpCrs : IObjectCursor;
|
||||
@ -609,18 +670,30 @@ function TWsdlParser.ParsePortType(ANode, ABindingNode : TDOMNode) : TInterfaceD
|
||||
if Assigned(nd.Attributes) and ( nd.Attributes.Length > 0 ) then begin
|
||||
tmpCrs := CreateCursorOn(
|
||||
CreateAttributesCursor(nd,cetRttiNode),
|
||||
ParseFilter(Format('%s = %s',[s_NODE_NAME,QuotedStr(s_soapAction)]),TDOMNodeRttiExposer)
|
||||
ParseFilter(
|
||||
Format( '%s = %s or %s = %s',
|
||||
[ s_NODE_NAME,QuotedStr(s_soapAction),
|
||||
s_NODE_NAME,QuotedStr(s_style)
|
||||
]
|
||||
),
|
||||
TDOMNodeRttiExposer
|
||||
)
|
||||
);
|
||||
tmpCrs.Reset();
|
||||
if tmpCrs.MoveNext() then begin
|
||||
nd := (tmpCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject;
|
||||
AOp.Properties.Values[s_soapAction] := nd.NodeValue;
|
||||
if AnsiSameText(nd.NodeName,s_style) then begin
|
||||
AOp.Properties.Values[s_soapStyle] := nd.NodeValue;
|
||||
end else if AnsiSameText(nd.NodeName,s_soapAction) then begin
|
||||
AOp.Properties.Values[s_TRANSPORT + '_' + s_soapAction] := nd.NodeValue;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
ParseOperation_EncodingStyle(ABndngOpCurs,AOp);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
locIntf : TInterfaceDefinition;
|
||||
locAttCursor : IObjectCursor;
|
||||
@ -659,7 +732,7 @@ begin
|
||||
locObj := locOpCursor.GetCurrent() as TDOMNodeRttiExposer;
|
||||
locMthd := ParseOperation(locIntf,locObj.InnerObject,locSoapBindingStyle);
|
||||
if Assigned(locMthd) then begin
|
||||
ParseOperationAtt_SoapAction(locBindingOperationCursor,locMthd);
|
||||
ParseOperationAttributes(locBindingOperationCursor,locMthd);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -1986,7 +2059,7 @@ begin
|
||||
);
|
||||
end;
|
||||
|
||||
function TComplexTypeParser.GetParserSupportedStyle(): string;
|
||||
class function TComplexTypeParser.GetParserSupportedStyle(): string;
|
||||
begin
|
||||
Result := s_complexType;
|
||||
end;
|
||||
@ -2190,7 +2263,7 @@ begin // todo : implement TSimpleTypeParser.ParseOtherContent
|
||||
Result := TTypeAliasDefinition.Create(FTypeName,FSymbols.ByName(FBaseName) as TTypeDefinition);
|
||||
end;
|
||||
|
||||
function TSimpleTypeParser.GetParserSupportedStyle(): string;
|
||||
class function TSimpleTypeParser.GetParserSupportedStyle(): string;
|
||||
begin
|
||||
Result := s_simpleType;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user