<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<a>This is possible. You need to assign an OnBeforeExecuteStream
event that you use to write out the XML to a file.<br>
<br>
The default HttpRio does not / did not surface this event so this
is what you do....<br>
<br>
1) Create an enhanced class that does surface this event like
so...<br>
<br>
TBeforeExecuteStreamEvent = procedure(const MethodName:
string; Request: TStream) of object;<br>
<br>
THTTPRioEnh = Class(THTTPRIO)<br>
private<br>
fOnBeforeExecuteStream: TBeforeExecuteStreamEvent;<br>
protected<br>
procedure DoBeforeExecute (const MethodName: string;
Request: TStream); override;<br>
published<br>
property OnBeforeExecuteStream: TBeforeExecuteStreamEvent
read fOnBeforeExecuteStream write fOnBeforeExecuteStream;<br>
end;<br>
<br>
<br>
procedure THTTPRioEnh.DoBeforeExecute(const MethodName: string;<br>
Request: TStream);<br>
begin<br>
inherited;<br>
if (Assigned( fOnBeforeExecuteStream ) = True) then begin<br>
fOnBeforeExecuteStream( MethodName, Request );<br>
end;<br>
end;<br>
<br>
<br>
2) When you use it assign the event (I use mine to compress and
encrypt data)<br>
fHTTPRioEnh := THTTPRioEnh.Create(nil);<br>
try<br>
fHTTPRioEnh.OnBeforeExecuteStream :=
BeforeSendCompression;<br>
<br>
3) In your event save the 'Request' Stream to file. This is your
XML. You can also override it with anything else at this point.<br>
<br>
Hope that helps. <br>
<br>
Rob<br>
<br>
<br>
</a>On 17/09/2010 3:35 p.m., Jeremy Coulter wrote:
<blockquote
cite="mid:AANLkTinscTFo-3APUHa_TP7GnZzYpQqr6wvOn3oiCYjO@mail.gmail.com"
type="cite">Hi all.<br>
To follow on from my last email.<br>
Is there a way I can actually view the generated XML that is
transmitted by the THTTPRIO object?<br>
This might be the best way for me to see whats going on and to
make sure that there is no malformed XML etc.<br>
<br>
<br>
Thansk Jeremy<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
</blockquote>
</body>
</html>