Cheers Rob. I will take alook..<br><br>Jeremy<br><br><div class="gmail_quote">On Fri, Sep 17, 2010 at 3:59 PM, Robert martin <span dir="ltr"><<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div 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><div><div></div><div class="h5">On 17/09/2010 3:35 p.m., Jeremy Coulter wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">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>
</div></div><pre><fieldset></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
</blockquote>
</div>
<br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br>