Reputation: 59
I'm using Delphi XE4 Pro I created a server DLL with webBroker and created the client DLL importing the server WSDL interface. Everything works fine, but now I want to connect using a secure connection https. On the server I have a valid *.domain SSL certificate issued by godaddy. By simply changing the RIO URL to use https all client-server communications still work.
My question is: Do you know if now in XE4 THTTPRIO is capable to automatically handle https connections or I need to alter (somehow) the code? Also, can you suggest a good tool to verify headers in order to see if in fact I'm using a good https connection?
Thank you very much..
function GetIHFSINET(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IHFSINET;
const
defWSDL_server = 'https://etc';
defURL_server = 'https://etc';
defSvc = 'IHFSINETservice';
defPrt = 'IHFSINETPort';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
Addr := defWSDL_server; //there is actually a function that returns the correct URL to use
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as IHFSINET);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
Upvotes: 1
Views: 2806
Reputation: 2873
Changing the URL to https is all you need to do - it will take care of the rest by changing the port to 443 etc.
As far as verifying the message you may want to look into RIO.OnBeforeExecute and RIO.OnAfterExecute events.
Upvotes: 1