It didn't affect my application when it was under Indy 9.
Since we migrate it on Indy 10. My application can't connect to the Soap
web service.
a THTTPRIO is created, an url is filled... and when testing the
connection it returns me this exception :
The exception generated is a ESOAPHTTPException :
"
A connection with the server could not be established -
URL:http://10.29.121.9:1024/soap/IEMSLic_Client -
SOAPAction:urn:soapIEMS_Lic-IEMSLic_Client#ConnectionOk
"
Can anyone light me ?
is there a special configuration with indy10 and proxy settings ?
why changing proxy settings of IE affects the httprio connection ?
Best Regards,
Christophe Rozec
var soap : IEMSLic_Client; // --> IEMSLic_Client=interface(IInvokable)
try
Soap:=GetIELOMAPServicesClient(sServeur,iPort);
except
on e: Exception do begin
ErreurString:=e.Message+' - '+e.ClassName;
Soap:=nil;
end;
end;
if not Assigned(Soap) then begin
ErreurString:='Impossible de se connecter à ELOMAPServices
('+ErreurString+')';
Exit;
end;
// On teste la connection SOAP
try
if not Soap.ConnectionOk then begin
ErreurString:='Connection KO';
Soap:=nil;
Exit;
end;
except
on e: Exception do begin
ErreurString:='Dialogue impossible avec ELOMAPServices Lic_Client
(sur '+sServeur+':'+IntToStr(iPort)+' -- '+e.Message+' - '+e.ClassName+')';
Trace.EmpileChaine('CZE ' + e.Message);
Exit;
end;
end;
function getIELOMAPServicesClient(const Serveur: string; Port: Integer):
IEMSLic_Client;
var
RIO: THTTPRIO;
begin
Result:=nil;
RIO:=nil;
try
RIO:=THTTPRIO.Create(nil);
RIO.HTTPWebNode.ConnectTimeout:=CONNECT_TIME_OUT;
RIO.HTTPWebNode.SendTimeout:=SEND_TIME_OUT;
RIO.HTTPWebNode.ReceiveTimeout:=RECEIVE_TIME_OUT;
(RIO as EMSLic_Client).URL:=
'http://'+Serveur+':'+IntToStr(Port)+'/soap/IEMSLic_Client';
finally
if (Result=nil) and Assigned(RIO) then begin
// RIO détruit
FreeAndNil(RIO);
end;
end;
end;
I do not see how the code below can work. You are never assigning a result in getIELOPMAPServicesClient.
--------------------------------------------------------
Here is my code, maybe it could help :
var soap : IEMSLic_Client; // --> IEMSLic_Client=interface(IInvokable)
try
Soap:=GetIELOMAPServicesClient(sServeur,iPort);
.......
function getIELOMAPServicesClient(const Serveur: string; Port: Integer): IEMSLic_Client;
var
RIO: THTTPRIO;
begin
Result:=nil;
RIO:=nil;
try
RIO:=THTTPRIO.Create(nil);
RIO.HTTPWebNode.ConnectTimeout:=CONNECT_TIME_OUT;
RIO.HTTPWebNode.SendTimeout:=SEND_TIME_OUT;
RIO.HTTPWebNode.ReceiveTimeout:=RECEIVE_TIME_OUT;
(RIO as EMSLic_Client).url: =
But i've found a way to solve my problem. Simply creating an exception
in the IE proxy options (button advanced)....
Christophe