type TTDSOAPClient = class(THTTPRIO) private { Private declarations } function OngetConc( var sStr: string ): boolean; protected { Protected declarations } procedure DoBeforeExecute(const MethodName: string; Request: TStream); override; public { Public declarations } published { Published declarations } end;
procedure TTDSOAPClient.DoBeforeExecute(const MethodName: string; Request: TStream); begin // change Request here.... inherited DoBeforeExecute( MethodName, Request ); end; --- Jason Saggers <[EMAIL PROTECTED]> wrote: > >From the example you have posted the Request being > past into the > DoBeforeExecute isn't a var so cant be changed by > the Procedure. > > You can use the contents of the Request to do > something, but you cant > alter it. > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Nick > Sent: Friday, 27 April 2007 3:09 p.m. > To: NZ Borland Developers Group - Delphi List > Subject: Re: [DUG] SOAP Question (lets see who the > soap guru's are :P) > > Ah im still not having any luck. > This is what I did > > type > TCHTTPRIO = class(THTTPRIO) > procedure DoBeforeExecute(const MethodName: > string; Request: > TStream); override; > end; > > procedure TCHTTPRIO.DoBeforeExecute(const > MethodName: string; Request: > TStream); > var > StrStrm: TStringStream; > ReqW: WideString; > Req:string; > begin > inherited; > Req := ReqW; > StrStrm := TStringStream.Create(Req); > try > StrStrm.Position := 0; > Request.CopyFrom( StrStrm, 0 ); > finally > StrStrm.Free; > end; > end; > > However, it still doesn't overwrite the request > stream. > I might be missing something obvious, but I can't > see it.... > I put a showmessage('hi'); in my new > TCHTTPRIO.DoBeforeExecute and it > shows... > > > > Edward Koryagin wrote: > > Sorry I don't remember all details... > > I inherited from THTTPRIO and did changes to tags > to > > build correct request to SOAP server. > > > > --- Nick <[EMAIL PROTECTED]> wrote: > > > > > >> This page does - my mistake > >> http://qc.borland.com/wc/qcmain.aspx?d=14046 > >> > >> Nick wrote: > >> > >>> Correct, and I see the soap request when I look > at > >>> > >> the DoBeforeExexute > >> > >>> I can't modify the var given however this page > >>> > >> shows how you can > >> > >>> modify the thttprio > >>> > >>> > > > http://www.google.com/apis/adwords/developer/adwords_api_classref.html > > > >>> but havn't done that yet (will have to > re-compile > >>> > >> that component?) > >> > >>> > >>> Edward Koryagin wrote: > >>> > >>>> Are you working with THTTPRIO? > >>>> > >>>> --- Nick <[EMAIL PROTECTED]> wrote: > >>>> > >>>> > >>>> > >>>>> How do you mean? Changed it to/for what for > >>>>> > >> what? > >> > >>>>> : - ) > >>>>> > >>>>> Edward Koryagin wrote: > >>>>> > >>>>> > >>>>>> for THTTPRIO > >>>>>> on DoBeforeExecute > >>>>>> I changed Request manually > >>>>>> > >>>>>> --- Nick <[EMAIL PROTECTED]> wrote: > >>>>>> > >>>>>> > >>>>>> > >>>>>>> Hey there, > >>>>>>> > >>>>>>> Thanks for that! :-) > >>>>>>> I compared the different between the D2007 > and > >>>>>>> > >>>>>>> > >>>>> D2006 > >>>>> > >>>>> > >>>>>>> and I can see the D2007 is better, some > calls > >>>>>>> > >> much simpler. ie > >> > >>>>>>> D2007 -> function > getUsageQuotaThisMonth: > >>>>>>> Int64; stdcall; > >>>>>>> D2006 -> function > >>>>>>> > >>>>> getUsageQuotaThisMonth(const > >>>>> > >>>>> > >>>>>>> parameters: getUsageQuotaThisMonth): > >>>>>>> getUsageQuotaThisMonthResponse; stdcall; > >>>>>>> I got the D2006 one working, but would of > been > >>>>>>> simplir if I had 2007 lol. > >>>>>>> > >>>>>>> I got my other pas files working except when > >>>>>>> > >> the > >> > >>>>>>> parameter is an array, I also just tried > with > >>>>>>> > >> the D2007 and also > >> > >>>>>>> get an > >>>>>>> error when the parameter is an array. > >>>>>>> Here is an example. > >>>>>>> > >>>>>>> var > >>>>>>> param : Array_Of_KeywordRequest; { > decleared > >>>>>>> > >> as > >> > >>>>>>> Array_Of_KeywordRequest = array of > >>>>>>> > >>>>>>> > >>>>> KeywordRequest; } > >>>>> > >>>>> > >>>>>>> begin > >>>>>>> Setlength(param, 1); > >>>>>>> param[0] := KeywordRequest.Create; > >>>>>>> param[0].id := 0; > >>>>>>> param[0].maxCpc := 5; > >>>>>>> param[0].negative := false; > >>>>>>> param[0].text := 'ipod'; > >>>>>>> param[0].type_ := Broad; > >>>>>>> res := ( Intf as TrafficEstimatorInterface > >>>>>>> ).estimateKeywordList(param); > >>>>>>> > >>>>>>> it complies fine but when it runs it gets a > >>>>>>> > >> soap > >> > >>>>>>> error. Any call that doesn't use an array as > a > >>>>>>> > >> param runs fine. > >> > >>>>>>> O.o > >>>>>>> > >>>>>>> Jeremy North wrote: > >>>>>>> > >>>>>>> > >>>>>>>> Hi Nick, > >>>>>>>> > >>>>>>>> Here are two from D2007. Don't know if they > === message truncated === Edward Koryagin Send instant messages to your online friends http://au.messenger.yahoo.com _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe