Board index » delphi » Re: Compressing and encrypting SOAP messages

Re: Compressing and encrypting SOAP messages


2005-07-04 04:53:19 PM
delphi33
All I have done on the client side is override the DoBeforeExecute Method as
suggested and it works fine.
jim
"Mischa Simmonds" <XXXX@XXXXX.COM>wrote in
message news:42c7e60c$XXXX@XXXXX.COM...
Quote
Had a look at this. But I'd have suspected that you would need to
overide "function THTTPReqResp.Send(const S: WideString): Integer;" in
SOAPHTTPTrans.pas which calls HttpSendRequest (wininet.pas), as it is
expecting a WideString as well, as well as the UTF8Encode function.


Deepak Shenoy (TeamB) writes:

>Ok, I see what you mean. Here's a way:
>1) Write a descendant component from THttpRio (call it THTTPRioEnh)
>
>2) Declare a type like so:
>TBeforeExecuteStreamEvent = procedure(const MethodName: string; Request
>: TStream) of object;
>
>3) In the THTTPRioEnh class, declare a published variable of type:
>property OnBeforeExecuteStream: TBeforeExecuteStreamEvent read
>FOnBeforeExecuteStream write FOnBeforeExecuteStream;
>
>Hit Ctrl+Shift+C. The private variable should get declared
>automatically.
>
>4) override the DoBeforeExecute procedure and in it put:
>
>procedure DoBeforeExecute(const MethodName: string; Request: TStream);
>begin
>inherited DoBeforeExecute(MethodName: string; Request: TStream);
>if Assigned( FOnBeforeExecuteStream ) then
>FOnBeforeExecuteStream( MethodName, Request );
>end;
>
>Then register and all that stuff.
>
>You can then assign a handler to OnbeforeExecutestream of this
>inherited component.
>
>I am lazy, so I did all this in Rio.Pas and instead of creating a
>handler in the IDE I set this up in code instead, something like:
>
>HTTPRio1.OnBeforeExecuteStream := BeforeExecuteStream;
>
>Where I do the modifications to the request stream.
>
>Hope this helps,
>
>
 
 

Re: Compressing and encrypting SOAP messages

But if you encrypt/compress the SOAPRequest, which is a WideString, you
will end up with a NULL value somewhere in the data, and the widestring
will stop at that point !
james rimell writes:
Quote
All I have done on the client side is override the DoBeforeExecute Method as
suggested and it works fine.

jim

 

Re: Compressing and encrypting SOAP messages

I see what you mean, though my version of THTTPReqResp has send declared
as...
function THTTPReqResp.Send(const ASrc: TStream): Integer;
this is as in delphi7, are you on a previous version?
"Mischa Simmonds" <XXXX@XXXXX.COM>wrote in
message news:42c90123$XXXX@XXXXX.COM...
Quote
But if you encrypt/compress the SOAPRequest, which is a WideString, you
will end up with a NULL value somewhere in the data, and the widestring
will stop at that point !

james rimell writes:

>All I have done on the client side is override the DoBeforeExecute Method as
>suggested and it works fine.
>
>jim
>
 

Re: Compressing and encrypting SOAP messages

I am actually using C++Builder v6 Enterprise. It looks like you guys are
still a step ahead !! :-( @#$%^&*!
My declaration is: function THTTPReqResp.Send(const S: WideString):
Integer;
None of the upgrade patches address this! If I had access to the Delph
source for the Soap and Internet directories would that solve my
problem? i.e.: Simply rebuild the VCL with the updated source, or is
there more to it than that and that is why Builder has not been 'upgraded' ?
james rimell writes:
Quote
I see what you mean, though my version of THTTPReqResp has send declared
as...

function THTTPReqResp.Send(const ASrc: TStream): Integer;

this is as in delphi7, are you on a previous version?



 

Re: Compressing and encrypting SOAP messages

I have no idea about the implications of rebuilding the VCL using the delphi
code though I have seen a chunk of it published somewhere in the groups on
my travels either by someone from Team B or Borland, not sure which
After a brief look into the origins of the TStreams in the delpi code I
think they begin in the TRIO.Generic function as local variables this maybe
a good place to start if you wanted to pass streams instead of widestrings,
I'm still fairly new to this stuff though so don't take my word for it!!
"Mischa Simmonds" <XXXX@XXXXX.COM>wrote in
message news:XXXX@XXXXX.COM...
Quote
I am actually using C++Builder v6 Enterprise. It looks like you guys are
still a step ahead !! :-( @#$%^&*!

My declaration is: function THTTPReqResp.Send(const S: WideString):
Integer;

None of the upgrade patches address this! If I had access to the Delph
source for the Soap and Internet directories would that solve my problem?
i.e.: Simply rebuild the VCL with the updated source, or is there more to
it than that and that is why Builder has not been 'upgraded' ?


james rimell writes:

>I see what you mean, though my version of THTTPReqResp has send declared
>as...
>
>function THTTPReqResp.Send(const ASrc: TStream): Integer;
>
>this is as in delphi7, are you on a previous version?
>
>