<!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.&nbsp; 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&nbsp; / 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>
      &nbsp;&nbsp;&nbsp; TBeforeExecuteStreamEvent = procedure(const MethodName:
      string; Request: TStream) of object;<br>
      <br>
      &nbsp;&nbsp;&nbsp; THTTPRioEnh = Class(THTTPRIO)<br>
      &nbsp;&nbsp;&nbsp; private<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fOnBeforeExecuteStream: TBeforeExecuteStreamEvent;<br>
      &nbsp;&nbsp;&nbsp; protected<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; procedure DoBeforeExecute (const MethodName: string;
      Request: TStream); override;<br>
      &nbsp;&nbsp;&nbsp; published<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; property OnBeforeExecuteStream: TBeforeExecuteStreamEvent
      read fOnBeforeExecuteStream write fOnBeforeExecuteStream;<br>
      &nbsp;&nbsp;&nbsp; end;<br>
      <br>
      <br>
      procedure THTTPRioEnh.DoBeforeExecute(const MethodName: string;<br>
      &nbsp; Request: TStream);<br>
      begin<br>
      &nbsp; inherited;<br>
      &nbsp;&nbsp;&nbsp; if (Assigned( fOnBeforeExecuteStream ) = True) then begin<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fOnBeforeExecuteStream( MethodName, Request );<br>
      &nbsp;&nbsp;&nbsp; end;<br>
      end;<br>
      <br>
      <br>
      2) When you use it assign the event (I use mine to compress and
      encrypt data)<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fHTTPRioEnh := THTTPRioEnh.Create(nil);<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fHTTPRioEnh.OnBeforeExecuteStream&nbsp;&nbsp; :=
      BeforeSendCompression;<br>
      <br>
      3) In your event save the 'Request' Stream to file.&nbsp; This is your
      XML.&nbsp; 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>