Hi Robert
CIMA is the new app that is replacing the "soon to be outdated app" you refer to below. The dlls are sitting at ftp://ftp.flow.net.nz/Temp/ssleay32.zip for the next 15 minutes. The password in SSLIOHandlerGetPassword is generally not needed. It is the password for decrypting a client side certificate. You don't need one ofr CourierPost webservices SSLIOHandler.SSLOptions.RootCertFile := ''; SSLIOHandler.SSLOptions.KeyFile := ''; SSLIOHandler.SSLOptions.CertFile := ''; SSLIOHandler.SSLOptions.Method := idSSL23 or something SSLIOHandler.SSLOptions.Mode := sslmUnassigned; * Please note I will be on leave from Monday 8th March through to Wednesday 24th March. For support during this time please contact supp...@flowsoftware.co.nz <mailto:supp...@flowsoftware.co.nz> or 09 476 3577 Cameron Hart Development Manager Flow Software Limited PO Box 305-237, Triton Plaza P +64 9 476 3579 Auckland 0757, New Zealand M +64 21 222 3569 www.flowsoftware.co.nz <http://www.flowsoftware.co.nz> E cameron.h...@flowsoftware.co.nz <mailto:cameron.h...@flowsoftware.co.nz> This message is intended for the addressee named above. It may contain privileged or confidential information. If you are not the intended recipient of this message you must not use, copy, distribute or disclose it to anyone. P Please consider the environment before printing this email From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Robert martin Sent: Friday, 26 February 2010 12:01 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Http help Hi Cameron We were advised by them to not use the soon to be outdated app. We have everything else working and were to be installing this afternoon. There test service has been accepting our messages find but further viewing showed they had not items ! I am trying to install the dlls from http://www.slproweb.com/products/Win32OpenSSL.html but this seems to be a full install and currently is frozen ! I am using Indy 10 on D2007 any way you could get your dlls to me, please...... p.s. thanks for the code snippet p.p.s Do I need to set passwords in the ssl handler AND the idHttp.request as well? Cheers Rob On 26/02/2010 11:36 a.m., Cameron Hart wrote: Just sent this with attached dll but the list doenst like it as its too big so you will have to find your own Open SSL dlls.... You get 'Invalid IOHandler' because you have not applied a SSL handler to your idHTTP object, yet you are posting to a HTTPS address. The bits of code you need are below Uses IdSSLOpenSSL, IdSSL SSLIOHandler: TIdSSLIOHandlerSocketOpenSSL; function SSLIOHandlerVerifyPeer(Certificate: TIdX509; AOk: Boolean; ADepth: Integer): Boolean; begin Result := True; end; procedure SSLIOHandlerGetPassword(var Password: String); begin Password := ''; end; SSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); //was Self 6/6/06 SSLIOHandler.MaxLineAction := maSplit; SSLIOHandler.OnVerifyPeer := SSLIOHandlerVerifyPeer; SSLIOHandler.OnGetPassword := SSLIOHandlerGetPassword; SSLIOHandler.SSLOptions.RootCertFile := RootCertificate; SSLIOHandler.SSLOptions.KeyFile := SSLClientKeyFile; SSLIOHandler.SSLOptions.CertFile := SSLClientCertFile; SSLIOHandler.SSLOptions.Method := IndySSLTypeArray[FSSLCLientType]; SSLIOHandler.SSLOptions.Mode := sslmUnassigned; //sslmClient; SSLIOHandler.SSLOptions.VerifyMode := [sslvrfPeer]; HTTP.IOHandler := SSLIOHandler The hard part is getting the correct ssl dlls for the version of indy you have. The attached work for me with indy 10. * Please note I will be on leave from Monday 8th March through to Wednesday 24th March. For support during this time please contact supp...@flowsoftware.co.nz <mailto:supp...@flowsoftware.co.nz> or 09 476 3577 Cameron Hart Development Manager Flow Software Limited PO Box 305-237, Triton Plaza P +64 9 476 3579 Auckland 0757, New Zealand M +64 21 222 3569 www.flowsoftware.co.nz <http://www.flowsoftware.co.nz> E cameron.h...@flowsoftware.co.nz <mailto:cameron.h...@flowsoftware.co.nz> This message is intended for the addressee named above. It may contain privileged or confidential information. If you are not the intended recipient of this message you must not use, copy, distribute or disclose it to anyone. P Please consider the environment before printing this email From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Robert martin Sent: Friday, 26 February 2010 11:13 a.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] Http help 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 Software development manager Chreos www.chreos.co.nz Ph +64 03 377-0495 _______________________________________________ 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
<<image001.jpg>>
<<image002.jpg>>
<<image003.jpg>>
_______________________________________________ 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