diff --git a/wst/trunk/base_service_intf.pas b/wst/trunk/base_service_intf.pas
index fb8925eb9..dd1001b07 100644
--- a/wst/trunk/base_service_intf.pas
+++ b/wst/trunk/base_service_intf.pas
@@ -1786,8 +1786,8 @@ begin
end else begin
itmName := AName;
end;
- len := AStore.BeginArrayRead(AName,ATypeInfo, GetStyle(),itmName);
- if ( len > 0 ) then begin
+ len := AStore.BeginArrayRead(AName,ATypeInfo,styl,itmName);
+ if ( len >= 0 ) then begin
Try
If Not Assigned(AObject) Then
AObject := Create();
@@ -2313,19 +2313,21 @@ begin
itmName := AName;
end;
len := AStore.BeginArrayRead(AName,ATypeInfo, GetStyle(),itmName);
- try
- if not Assigned(AObject) then
- AObject := Create();
- nativObj := nil;
- nativObj := AObject as TBaseSimpleTypeArrayRemotable;
- if ( len > 0 ) then begin
- nativObj.SetLength(len);
- for i := 0 to Pred(len) do begin
- nativObj.LoadItem(AStore,i);
+ if ( len >= 0 ) then begin
+ try
+ if not Assigned(AObject) then
+ AObject := Create();
+ nativObj := nil;
+ nativObj := AObject as TBaseSimpleTypeArrayRemotable;
+ if ( len >= 0 ) then begin
+ nativObj.SetLength(len);
+ for i := 0 to Pred(len) do begin
+ nativObj.LoadItem(AStore,i);
+ end;
end;
+ finally
+ AStore.EndScopeRead();
end;
- finally
- AStore.EndScopeRead();
end;
end;
@@ -3416,141 +3418,142 @@ Var
tr : TTypeRegistry;
begin
oldSS := AStore.GetSerializationStyle();
- AStore.BeginObjectRead(AName,ATypeInfo);
- try
- if AStore.IsCurrentScopeNil() then
- Exit; // ???? FreeAndNil(AObject);
- If Not Assigned(AObject) Then
- AObject := Create();
- LoadValue(AObject,AStore);
- objTypeData := GetTypeData(ATypeInfo);
- propCount := objTypeData^.PropCount;
- If ( propCount > 0 ) Then Begin
- propListLen := GetPropList(ATypeInfo,propList);
- Try
- tr := GetTypeRegistry();
- AStore.SetSerializationStyle(ssAttibuteSerialization);
- For i := 0 To Pred(propCount) Do Begin
- p := propList^[i];
- persistType := IsStoredPropClass(objTypeData^.ClassType,p);
- If ( persistType in [pstOptional,pstAlways] ) Then Begin
- pt := p^.PropType;
- propName := tr.ItemByTypeInfo[pt].GetExternalPropertyName(p^.Name);
- try
- Case pt^.Kind Of
- tkInt64,tkQWord :
- Begin
- AStore.Get(pt,propName,int64Data);
- SetOrdProp(AObject,p^.Name,int64Data);
- End;
- tkLString, tkAString :
- Begin
- AStore.Get(pt,propName,strData);
- SetStrProp(AObject,p^.Name,strData);
- End;
- tkBool :
- Begin
- AStore.Get(pt,propName,boolData);
- SetOrdProp(AObject,p^.Name,Ord(boolData));
- End;
- tkClass :
- Begin
- objData := GetObjectProp(AObject,p^.Name);
- objDataCreateHere := not Assigned(objData);
- try
- AStore.Get(pt,propName,objData);
- if objDataCreateHere then
- SetObjectProp(AObject,p^.Name,objData);
- finally
- if objDataCreateHere then
- FreeAndNil(objData);
- end;
- End;
- tkEnumeration,tkInteger :
- Begin
- FillChar(enumData,SizeOf(enumData),#0);
- Case GetTypeData(p^.PropType)^.OrdType Of
- otSByte :
- Begin
- AStore.Get(pt,propName,enumData.ShortIntData);
- int64Data := enumData.ShortIntData;
- End;
- otUByte :
- Begin
- AStore.Get(pt,propName,enumData.ByteData);
- int64Data := enumData.ByteData;
- End;
- otSWord :
- Begin
- AStore.Get(pt,propName,enumData.SmallIntData);
- int64Data := enumData.SmallIntData;
- End;
- otUWord :
- Begin
- AStore.Get(pt,propName,enumData.WordData);
- int64Data := enumData.WordData;
- End;
- otSLong:
- Begin
- AStore.Get(pt,propName,enumData.SLongIntData);
- int64Data := enumData.SLongIntData;
- End;
- otULong :
- Begin
- AStore.Get(pt,propName,enumData.ULongIntData);
- int64Data := enumData.ULongIntData;
- End;
+ if ( AStore.BeginObjectRead(AName,ATypeInfo) >= 0 ) then begin
+ try
+ if AStore.IsCurrentScopeNil() then
+ Exit; // ???? FreeAndNil(AObject);
+ If Not Assigned(AObject) Then
+ AObject := Create();
+ LoadValue(AObject,AStore);
+ objTypeData := GetTypeData(ATypeInfo);
+ propCount := objTypeData^.PropCount;
+ If ( propCount > 0 ) Then Begin
+ propListLen := GetPropList(ATypeInfo,propList);
+ Try
+ tr := GetTypeRegistry();
+ AStore.SetSerializationStyle(ssAttibuteSerialization);
+ For i := 0 To Pred(propCount) Do Begin
+ p := propList^[i];
+ persistType := IsStoredPropClass(objTypeData^.ClassType,p);
+ If ( persistType in [pstOptional,pstAlways] ) Then Begin
+ pt := p^.PropType;
+ propName := tr.ItemByTypeInfo[pt].GetExternalPropertyName(p^.Name);
+ try
+ Case pt^.Kind Of
+ tkInt64,tkQWord :
+ Begin
+ AStore.Get(pt,propName,int64Data);
+ SetOrdProp(AObject,p^.Name,int64Data);
End;
- SetOrdProp(AObject,p^.Name,int64Data);
- End;
- tkFloat :
- Begin
- FillChar(floatDt,SizeOf(floatBuffer),#0);
- Case GetTypeData(p^.PropType)^.FloatType Of
- ftSingle :
- Begin
- AStore.Get(pt,propName,floatBuffer.SingleData);
- floatDt := floatBuffer.SingleData;
- End;
- ftDouble :
- Begin
- AStore.Get(pt,propName,floatBuffer.DoubleData);
- floatDt := floatBuffer.DoubleData;
- End;
- ftExtended :
- Begin
- AStore.Get(pt,propName,floatBuffer.ExtendedData);
- floatDt := floatBuffer.ExtendedData;
- End;
- ftCurr :
- Begin
- AStore.Get(pt,propName,floatBuffer.CurrencyData);
- floatDt := floatBuffer.CurrencyData;
- End;
- ftComp :
- Begin
- AStore.Get(pt,propName,floatBuffer.CompData);
- floatDt := floatBuffer.CompData;
- End;
+ tkLString, tkAString :
+ Begin
+ AStore.Get(pt,propName,strData);
+ SetStrProp(AObject,p^.Name,strData);
End;
- SetFloatProp(AObject,p^.Name,floatDt);
- End;
- End;
- except
- on E : EServiceException do begin
- if ( persistType = pstAlways ) then
- raise;
+ tkBool :
+ Begin
+ AStore.Get(pt,propName,boolData);
+ SetOrdProp(AObject,p^.Name,Ord(boolData));
+ End;
+ tkClass :
+ Begin
+ objData := GetObjectProp(AObject,p^.Name);
+ objDataCreateHere := not Assigned(objData);
+ try
+ AStore.Get(pt,propName,objData);
+ if objDataCreateHere then
+ SetObjectProp(AObject,p^.Name,objData);
+ finally
+ if objDataCreateHere then
+ FreeAndNil(objData);
+ end;
+ End;
+ tkEnumeration,tkInteger :
+ Begin
+ FillChar(enumData,SizeOf(enumData),#0);
+ Case GetTypeData(p^.PropType)^.OrdType Of
+ otSByte :
+ Begin
+ AStore.Get(pt,propName,enumData.ShortIntData);
+ int64Data := enumData.ShortIntData;
+ End;
+ otUByte :
+ Begin
+ AStore.Get(pt,propName,enumData.ByteData);
+ int64Data := enumData.ByteData;
+ End;
+ otSWord :
+ Begin
+ AStore.Get(pt,propName,enumData.SmallIntData);
+ int64Data := enumData.SmallIntData;
+ End;
+ otUWord :
+ Begin
+ AStore.Get(pt,propName,enumData.WordData);
+ int64Data := enumData.WordData;
+ End;
+ otSLong:
+ Begin
+ AStore.Get(pt,propName,enumData.SLongIntData);
+ int64Data := enumData.SLongIntData;
+ End;
+ otULong :
+ Begin
+ AStore.Get(pt,propName,enumData.ULongIntData);
+ int64Data := enumData.ULongIntData;
+ End;
+ End;
+ SetOrdProp(AObject,p^.Name,int64Data);
+ End;
+ tkFloat :
+ Begin
+ FillChar(floatDt,SizeOf(floatBuffer),#0);
+ Case GetTypeData(p^.PropType)^.FloatType Of
+ ftSingle :
+ Begin
+ AStore.Get(pt,propName,floatBuffer.SingleData);
+ floatDt := floatBuffer.SingleData;
+ End;
+ ftDouble :
+ Begin
+ AStore.Get(pt,propName,floatBuffer.DoubleData);
+ floatDt := floatBuffer.DoubleData;
+ End;
+ ftExtended :
+ Begin
+ AStore.Get(pt,propName,floatBuffer.ExtendedData);
+ floatDt := floatBuffer.ExtendedData;
+ End;
+ ftCurr :
+ Begin
+ AStore.Get(pt,propName,floatBuffer.CurrencyData);
+ floatDt := floatBuffer.CurrencyData;
+ End;
+ ftComp :
+ Begin
+ AStore.Get(pt,propName,floatBuffer.CompData);
+ floatDt := floatBuffer.CompData;
+ End;
+ End;
+ SetFloatProp(AObject,p^.Name,floatDt);
+ End;
+ End;
+ except
+ on E : EServiceException do begin
+ if ( persistType = pstAlways ) then
+ raise;
+ end;
end;
- end;
+ End;
End;
+ Finally
+ Freemem(propList,propListLen*SizeOf(Pointer));
End;
- Finally
- Freemem(propList,propListLen*SizeOf(Pointer));
End;
- End;
- finally
- AStore.EndScopeRead();
- AStore.SetSerializationStyle(oldSS);
+ finally
+ AStore.EndScopeRead();
+ AStore.SetSerializationStyle(oldSS);
+ end;
end;
end;
@@ -3866,13 +3869,14 @@ class procedure TBaseDateRemotable.Load(
var
strBuffer : string;
begin
- AStore.BeginObjectRead(AName,ATypeInfo);
- try
- strBuffer := '';
- AStore.GetScopeInnerValue(TypeInfo(string),strBuffer);
- (AObject as TDateRemotable).AsDate := ParseDate(strBuffer);
- finally
- AStore.EndScopeRead();
+ if ( AStore.BeginObjectRead(AName,ATypeInfo) >= 0 ) then begin
+ try
+ strBuffer := '';
+ AStore.GetScopeInnerValue(TypeInfo(string),strBuffer);
+ (AObject as TDateRemotable).AsDate := ParseDate(strBuffer);
+ finally
+ AStore.EndScopeRead();
+ end;
end;
end;
diff --git a/wst/trunk/base_soap_formatter.pas b/wst/trunk/base_soap_formatter.pas
index 23e7af597..be7562814 100644
--- a/wst/trunk/base_soap_formatter.pas
+++ b/wst/trunk/base_soap_formatter.pas
@@ -439,7 +439,7 @@ function TAbstractArrayStackItem.FindNode(var ANodeName: string): TDOMNode;
begin
EnsureListCreated();
if ( FIndex >= FItemList.Count ) then
- raise ESOAPException.CreateFmt('Index out of bound : %d; Node Name = "%s"',[FIndex,ANodeName]);
+ raise ESOAPException.CreateFmt('Index out of bound : %d; Node Name = "%s"; Parent Node = "%s"',[FIndex,ANodeName,ScopeObject.NodeName]);
Result:= FItemList.Item[FIndex];
Inc(FIndex);
ANodeName := Result.NodeName;
diff --git a/wst/trunk/synapse_http_protocol.pas b/wst/trunk/synapse_http_protocol.pas
index 91df0964b..676da410c 100644
--- a/wst/trunk/synapse_http_protocol.pas
+++ b/wst/trunk/synapse_http_protocol.pas
@@ -13,7 +13,7 @@
unit synapse_http_protocol;
{$mode objfpc}{$H+}
-{$DEFINE WST_DBG}
+//{$DEFINE WST_DBG}
interface
diff --git a/wst/trunk/tests/amazon/amazon.lpi b/wst/trunk/tests/amazon/amazon.lpi
new file mode 100644
index 000000000..28475cd6f
--- /dev/null
+++ b/wst/trunk/tests/amazon/amazon.lpi
@@ -0,0 +1,310 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wst/trunk/tests/amazon/amazon.lpr b/wst/trunk/tests/amazon/amazon.lpr
new file mode 100644
index 000000000..06b1db083
--- /dev/null
+++ b/wst/trunk/tests/amazon/amazon.lpr
@@ -0,0 +1,18 @@
+program amazon;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Interfaces, // this includes the LCL widgetset
+ Forms,
+ umain, AWSECommerceService;
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TfMain, fMain);
+ Application.Run;
+end.
+
diff --git a/wst/trunk/tests/amazon/umain.lfm b/wst/trunk/tests/amazon/umain.lfm
new file mode 100644
index 000000000..68d52950f
--- /dev/null
+++ b/wst/trunk/tests/amazon/umain.lfm
@@ -0,0 +1,120 @@
+object fMain: TfMain
+ Left = 339
+ Height = 471
+ Top = 181
+ Width = 476
+ HorzScrollBar.Page = 475
+ VertScrollBar.Page = 470
+ ActiveControl = edtAccessID
+ Caption = 'WST Amazon - Sample'
+ Position = poDesktopCenter
+ object Label1: TLabel
+ Left = 16
+ Height = 18
+ Top = 24
+ Width = 69
+ Caption = 'Access Key'
+ Color = clNone
+ ParentColor = False
+ end
+ object Bevel1: TBevel
+ Left = 16
+ Height = 8
+ Top = 64
+ Width = 451
+ Anchors = [akTop, akLeft, akRight]
+ Shape = bsBottomLine
+ end
+ object Label2: TLabel
+ Left = 16
+ Height = 18
+ Top = 91
+ Width = 82
+ Caption = 'Search Index'
+ Color = clNone
+ ParentColor = False
+ end
+ object Label3: TLabel
+ Left = 16
+ Height = 18
+ Top = 142
+ Width = 82
+ Caption = 'Manufacturer'
+ Color = clNone
+ ParentColor = False
+ end
+ object Label4: TLabel
+ Left = 16
+ Height = 18
+ Top = 188
+ Width = 65
+ Caption = 'Key words'
+ Color = clNone
+ ParentColor = False
+ end
+ object Bevel2: TBevel
+ Left = 16
+ Height = 8
+ Top = 216
+ Width = 450
+ Anchors = [akTop, akLeft, akRight]
+ Shape = bsBottomLine
+ end
+ object edtAccessID: TEdit
+ Left = 118
+ Height = 23
+ Top = 24
+ Width = 202
+ TabOrder = 0
+ end
+ object edtSearchIndex: TEdit
+ Left = 127
+ Height = 23
+ Top = 91
+ Width = 338
+ Anchors = [akTop, akLeft, akRight]
+ TabOrder = 1
+ Text = 'All'
+ end
+ object edtManufacturer: TEdit
+ Left = 127
+ Height = 23
+ Top = 142
+ Width = 338
+ Anchors = [akTop, akLeft, akRight]
+ TabOrder = 2
+ end
+ object mmoRes: TMemo
+ Left = 16
+ Height = 210
+ Top = 248
+ Width = 449
+ Anchors = [akTop, akLeft, akRight, akBottom]
+ Lines.Strings = (
+ 'Memo1'
+ )
+ ScrollBars = ssAutoBoth
+ TabOrder = 3
+ WordWrap = False
+ end
+ object btnSearch: TButton
+ Left = 390
+ Height = 25
+ Top = 24
+ Width = 75
+ Anchors = [akTop, akRight]
+ BorderSpacing.InnerBorder = 4
+ Caption = 'Search'
+ OnClick = btnSearchClick
+ TabOrder = 4
+ end
+ object edtKeywords: TEdit
+ Left = 127
+ Height = 23
+ Top = 188
+ Width = 338
+ Anchors = [akTop, akLeft, akRight]
+ TabOrder = 5
+ Text = 'Harry Potter'
+ end
+end
diff --git a/wst/trunk/tests/amazon/umain.lrs b/wst/trunk/tests/amazon/umain.lrs
new file mode 100644
index 000000000..7db5494d7
--- /dev/null
+++ b/wst/trunk/tests/amazon/umain.lrs
@@ -0,0 +1,34 @@
+{ Ceci est un fichier ressource généré automatiquement par Lazarus }
+
+LazarusResources.Add('TfMain','FORMDATA',[
+ 'TPF0'#6'TfMain'#5'fMain'#4'Left'#3'S'#1#6'Height'#3#215#1#3'Top'#3#181#0#5'W'
+ +'idth'#3#220#1#18'HorzScrollBar.Page'#3#219#1#18'VertScrollBar.Page'#3#214#1
+ +#13'ActiveControl'#7#11'edtAccessID'#7'Caption'#6#19'WST Amazon - Sample'#8
+ +'Position'#7#15'poDesktopCenter'#0#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'
+ +#2#18#3'Top'#2#24#5'Width'#2'E'#7'Caption'#6#10'Access Key'#5'Color'#7#6'clN'
+ +'one'#11'ParentColor'#8#0#0#6'TBevel'#6'Bevel1'#4'Left'#2#16#6'Height'#2#8#3
+ +'Top'#2'@'#5'Width'#3#195#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#5
+ +'Shape'#7#12'bsBottomLine'#0#0#6'TLabel'#6'Label2'#4'Left'#2#16#6'Height'#2
+ +#18#3'Top'#2'['#5'Width'#2'R'#7'Caption'#6#12'Search Index'#5'Color'#7#6'clN'
+ +'one'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#16#6'Height'#2#18#3
+ +'Top'#3#142#0#5'Width'#2'R'#7'Caption'#6#12'Manufacturer'#5'Color'#7#6'clNon'
+ +'e'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#16#6'Height'#2#18#3
+ +'Top'#3#188#0#5'Width'#2'A'#7'Caption'#6#9'Key words'#5'Color'#7#6'clNone'#11
+ +'ParentColor'#8#0#0#6'TBevel'#6'Bevel2'#4'Left'#2#16#6'Height'#2#8#3'Top'#3
+ +#216#0#5'Width'#3#194#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#5'Shap'
+ +'e'#7#12'bsBottomLine'#0#0#5'TEdit'#11'edtAccessID'#4'Left'#2'v'#6'Height'#2
+ +#23#3'Top'#2#24#5'Width'#3#202#0#8'TabOrder'#2#0#0#0#5'TEdit'#14'edtSearchIn'
+ +'dex'#4'Left'#2''#6'Height'#2#23#3'Top'#2'['#5'Width'#3'R'#1#7'Anchors'#11#5
+ +'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#1#4'Text'#6#3'All'#0#0#5'TEdit'
+ +#15'edtManufacturer'#4'Left'#2''#6'Height'#2#23#3'Top'#3#142#0#5'Width'#3'R'
+ +#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#2#0#0#5'TMemo'
+ +#6'mmoRes'#4'Left'#2#16#6'Height'#3#210#0#3'Top'#3#248#0#5'Width'#3#193#1#7
+ +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#13'Lines.Strings'#1
+ +#6#5'Memo1'#0#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#3#8'WordWrap'#8#0
+ +#0#7'TButton'#9'btnSearch'#4'Left'#3#134#1#6'Height'#2#25#3'Top'#2#24#5'Widt'
+ +'h'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2
+ +#4#7'Caption'#6#6'Search'#7'OnClick'#7#14'btnSearchClick'#8'TabOrder'#2#4#0#0
+ +#5'TEdit'#11'edtKeywords'#4'Left'#2''#6'Height'#2#23#3'Top'#3#188#0#5'Width'
+ +#3'R'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#5#4'Text'
+ +#6#12'Harry Potter'#0#0#0
+]);
diff --git a/wst/trunk/tests/amazon/umain.pas b/wst/trunk/tests/amazon/umain.pas
new file mode 100644
index 000000000..327269c16
--- /dev/null
+++ b/wst/trunk/tests/amazon/umain.pas
@@ -0,0 +1,126 @@
+unit umain;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
+ AWSECommerceService, StdCtrls, ExtCtrls, Buttons;
+
+type
+
+ { TfMain }
+
+ TfMain = class(TForm)
+ Bevel1: TBevel;
+ Bevel2: TBevel;
+ btnSearch: TButton;
+ edtAccessID: TEdit;
+ edtKeywords: TEdit;
+ edtSearchIndex: TEdit;
+ edtManufacturer: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Label4: TLabel;
+ mmoRes: TMemo;
+ procedure btnSearchClick(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ fMain: TfMain;
+
+implementation
+uses soap_formatter,
+ synapse_http_protocol,
+ AWSECommerceService_proxy;
+
+{ TfMain }
+
+procedure TfMain.btnSearchClick(Sender: TObject);
+var
+ locService : AWSECommerceServicePortType;
+ 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;
+ itm : Item_Type;
+begin
+ mmoRes.Clear();
+ rsps := nil;
+ 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'
+ );
+ rqst.AWSAccessKeyId := edtAccessID.Text;
+ rqst.Request.SetLength(1);
+ rqst.Request[0].Manufacturer := edtManufacturer.Text;
+ rqst.Request[0].SearchIndex := edtSearchIndex.Text;
+ rqst.Request[0].Availability := Available;
+ rqst.Request[0].Count := 10;
+ rqst.Request[0].MerchantId := 'Amazon';
+ rqst.Request[0].ItemPage := 1;
+ rqst.Request[0].Keywords := edtKeywords.Text;
+ rsps := locService.ItemSearch(rqst);
+ if ( rsps.OperationRequest.Errors.Length > 0 ) then begin
+ mmoRes.Lines.Add(Format('Errors ( %d ) : ',[rsps.OperationRequest.Errors.Length]));
+ for i := 0 to Pred(rsps.OperationRequest.Errors.Length) do begin
+ mmoRes.Lines.Add(Format(' Error[%d] :',[i]));
+ mmoRes.Lines.Add(' ' + rsps.OperationRequest.Errors[i].Code);
+ mmoRes.Lines.Add(' ' + rsps.OperationRequest.Errors[i].Message);
+ end;
+ end else begin
+ mmoRes.Lines.Add(Format('Response ( %d ) : ',[rsps.Items.Length]));
+ if Assigned(rsps) then begin
+ for i := 0 to Pred(rsps.Items.Length) do begin
+ rspsItem := rsps.Items[i];
+ mmoRes.Lines.Add(' TotalPages :' + IntToStr(rspsItem.TotalPages));
+ mmoRes.Lines.Add(' TotalResults :' + IntToStr(rspsItem.TotalResults));
+ mmoRes.Lines.Add(' Items :' + IntToStr(rspsItem._Item.Length));
+ mmoRes.Lines.Add('');
+ for j := 0 to Pred(rspsItem._Item.Length) do begin
+ itm := rspsItem._Item[j];;
+ mmoRes.Lines.Add(' ASIN :' + itm.ASIN);
+ mmoRes.Lines.Add(' DetailPageURL :' + itm.DetailPageURL);
+ if Assigned(itm.ItemAttributes) then begin
+ mmoRes.Lines.Add(' Title :' + itm.ItemAttributes.Title);
+ for k := 0 to Pred(itm.ItemAttributes.Author.Length) do begin
+ mmoRes.Lines.Add(' Author[ ' + IntToStr(k) + ' ] ' + itm.ItemAttributes.Author.Item[k]);
+ end;
+ mmoRes.Lines.Add(' Manufacturer :' + itm.ItemAttributes.Manufacturer);
+ mmoRes.Lines.Add(' ProductGroup :' + itm.ItemAttributes.ProductGroup);
+ end;
+ mmoRes.Lines.Add('');
+ end;
+ end;
+ end else begin
+ ShowMessage('not Assigned(rsps)');
+ end;
+ end;
+ finally
+ Screen.Cursor := crDefault;
+ FreeAndNil(rqst);
+ FreeAndNil(rsps);
+ end;
+end;
+
+initialization
+ {$I umain.lrs}
+
+ Register_AWSECommerceService_ServiceMetadata();
+ SYNAPSE_RegisterHTTP_Transport();
+
+end.
diff --git a/wst/trunk/ws_helper/ws_helper.lpi b/wst/trunk/ws_helper/ws_helper.lpi
index e573cebb3..76f2d2205 100644
--- a/wst/trunk/ws_helper/ws_helper.lpi
+++ b/wst/trunk/ws_helper/ws_helper.lpi
@@ -58,8 +58,8 @@
-
-
+
+
@@ -249,8 +249,8 @@
-
-
+
+
@@ -343,128 +343,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/wst/trunk/ws_helper/wsdl2pas_imp.pas b/wst/trunk/ws_helper/wsdl2pas_imp.pas
index 9109415e9..6d1be3051 100644
--- a/wst/trunk/ws_helper/wsdl2pas_imp.pas
+++ b/wst/trunk/ws_helper/wsdl2pas_imp.pas
@@ -1812,7 +1812,7 @@ begin
classDef.AddProperty(
propTyp.Name,
FSymbols.ByName(Format('%s_%sArray',[internalName,propTyp.Name])) as TTypeDefinition
- );
+ ).RegisterExternalAlias(propTyp.ExternalName);
end;
end;
FreeAndNil(tmpClassDef);