<!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">
Great suggestion Edward. I already have this event in my inherited
class (I used it for testing and compression in some other projects).
This might be the easiest way to do it.<br>
<br>
Thanks<br>
Rob<br>
<div class="moz-signature">
<div class="Section1"><br>
<p class="MsoNormal"><span style="color: rgb(255, 153, 0);" lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN-NZ"><o:p> </o:p></span></p>
</div>
</div>
<br>
On 26/02/2010 12:03 p.m., Edward Koryagin wrote:
<blockquote cite="mid:224615.97876.qm@web65615.mail.ac4.yahoo.com"
type="cite">
<pre wrap="">You still can use SOAP here...
There is OnBeforeExecute event for THTTPRIO... ;)
Actually you have to inherit from THTTPRIO to change XML in this event.
Edward Koryagin
--- On Fri, 26/2/10, Robert martin <a class="moz-txt-link-rfc2396E" href="mailto:rob@chreos.co.nz"><rob@chreos.co.nz></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">From: Robert martin <a class="moz-txt-link-rfc2396E" href="mailto:rob@chreos.co.nz"><rob@chreos.co.nz></a>
Subject: [DUG] Http help
To: "NZ Borland Developers Group - Delphi List" <a class="moz-txt-link-rfc2396E" href="mailto:delphi@delphi.org.nz"><delphi@delphi.org.nz></a>
Received: Friday, 26 February, 2010, 11:13 AM
Hi Guys
I had imported a WSDL file and built a soap service to send
data to a
web service. Unfortunately there is a bug in the WSDL
that impacts
delphi but seems to be ignored in Microsoft tools (it
really is a
problem with the wsdl file). Anyway since it is a
simple job I thought
it might be quicker to fix by just removing the soap and
building the
XML manually and posting it with idHttp.
However I cant get it to work ! When I try and post
my test xml to the
web serivce I get an 'Invalid IOHandler' message in
the app. I have no
ioHandler defined but that works fine in my other apps
where I post to
php based web services. I am sure it is just some
weird indy bug but I
am under a huge deadline and need to sort this. Any
help would be
greatly appreciated.
code follows (this is quick and dirty proof of concept
code)
var
sl
: TStringList;
PostDataStream :
TStringStream;
SendStream
: TStringStream;
begin
PostDataStream :=
TStringStream.Create('');
sl := TStringList.Create;
try
IdHTTP.Request.Username := '9313527067946306';
IdHTTP.Request.Password := 'passdfsw9634306';
IdHTTP.ReadTimeout := 5000;
sl.LoadFromFile('E:\Work\Test
post\TestRequest.XML');
SendStream :=
TStringStream.Create(sl.text);
IdHTTP.Post('<a class="moz-txt-link-freetext" href="https://uateclonline.nzpost.co.nz/eclonlinewebnowse/Services.asmx">https://uateclonline.nzpost.co.nz/eclonlinewebnowse/Services.asmx</a>',
SendStream, PostDataStream); //Error here
ShowMessage(PostDataStream.DataString);
finally
sl.Free;
PostDataStream.Free;
SendStream.Free;
end;
--
Robert Martin
Robert Martin
Software
development
manager
Chreos
<a class="moz-txt-link-abbreviated" href="http://www.chreos.co.nz">www.chreos.co.nz</a>
Ph +64 03 377-0495
-----Inline Attachment Follows-----
_______________________________________________
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>
<pre wrap="">
_______________________________________________
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>