简体   繁体   中英

Delphi 2010 DataSnap Client with HTTPS

I have a DataSnap server written in Delphi XE3, deployed as an ISAPI module with SSL.

I'm writing a client application for this server, but it has to be written in Delphi 2010 for now. I'm having trouble connecting to the server through HTTPS. I have no trouble connecting to the server through HTTP.

I can write a client in XE3 that connects through HTTPS and succeeds, so I know the server is working fine.

The error I receive is:

Protocol HTTPS can be used after an adequate instance of TDBXCommunicationLayer is registered with TDBXCommunicationLayerFactory.

I've googled the solution to a problem like this and was instructed to add DSHTTPLayer to the uses clause of my unit, and that works for HTTP, but it's not working for HTTPS.

Any ideas out there? Thanks a lot for your time.

I ended up using TIdHTTP and TIdSSLIOHandlerSocketOpenSSL components to connect via HTTPS. I parsed the JSON with a TJSONParser. Delphi 2010 doesn't support HTTPS through the TDSRestConnection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM