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 <r...@chreos.co.nz> wrote: > From: Robert martin <r...@chreos.co.nz> > Subject: [DUG] Http help > To: "NZ Borland Developers Group - Delphi List" <delphi@delphi.org.nz> > 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('https://uateclonline.nzpost.co.nz/eclonlinewebnowse/Services.asmx', > SendStream, PostDataStream); //Error here > > > > > ShowMessage(PostDataStream.DataString); > > finally > > sl.Free; > > > PostDataStream.Free; > > > SendStream.Free; > > end; > > > > > > > > > > > > > > > > -- > > > > > > > Robert Martin > > > > > > Robert Martin > Software > development > manager > > Chreos > www.chreos.co.nz > > Ph +64 03 377-0495 > > > > > > > > > > > -----Inline Attachment Follows----- > > _______________________________________________ > NZ Borland Developers Group - Delphi mailing list > Post: delphi@delphi.org.nz > Admin: http://delphi.org.nz/mailman/listinfo/delphi > Unsubscribe: send an email to delphi-requ...@delphi.org.nz > with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe