Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

17 Good

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ertank

    Simple app for Android 5.0.2

    It was in Turkish and I did not have access to original message. You can find it attached. Thanks. AndroidManifest.xml
  2. ertank

    Simple app for Android 5.0.2

    Hello, I am using Delphi 10.4.2. There is a very simple app (needs internet and network status permissions, 3 pages total) that I need to run on Android 5.0.2. I compiled it with stock SDK 25.2.5 targeting Android32. When package tried to be loaded on Android 5.0.2 it says Compiler error There is a problem with the packet parsing. Docwiki says Delphi 10.4.2 supports Android 6 minimum. Even Delphi 10.3.3 supports Android 5.2 mimimum. I wonder if there is some "workaround" that I can use without installing an older version. Thanks & Regards, Ertan
  3. ertank

    thread-safe ways to call REST APIs in parallel

    Not a direct reply to the question. But, if I ever need to run parallel requests, I should be really thinking about building a custom thread class or two with main thread synchronization where needed.
  4. Both projects are working on production. There is no test environment. I do not have problem "sending" the request. Error is raised when I receive the response. I shared both projects raw response beginnings (taken using Fiddler) to show there is no difference that would result in such an error. However, single SOAP web service project works OK. Double SOAP web service project (this and another web service supported in a single project) raises mentioned error.
  5. One additional information I should add is this main project where I am receiving error is using more than one soap web services. Thinking of that it maybe related with that RegisterInterface() or RegisterXSClass() functions used in WSDL generated web service units I tried to switch unit creation. That did not help, too. One of the web services returning its envelope as below <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> Problematic one returning its envelope as below <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> There is this "SOAP-ENV" and "env" difference. But, they both seem to be defined properly. Moreover, I have no problem using problematic web service in a single project. Any help is appreciated. Thanks & Regards, Ertan
  6. Hello, I am using Delphi 10.3.3, targeting Win32 executable. There is a SOAP web service that I have build a class for it. That class runs just fine on a test project. However, when I put it in my main project, I get below error DocumentElement http://schemas.xmlsoap.org/soap/envelope/:Envelope expected, :Envelope found I checked, there is only one single unit for this web service in my whole computer and both projects are using that unit. I have used different SOAP web services in the past. Some of them rarely raise "HTML found" kind of error messages, but never got ":Envelope found" until now. None of my web searches lead me to same error message that I receive. I have all requests and responses saved in text files. Comparing them I can see no difference. It is only number of records returned changes due to filter parameters. I also used Fiddler Telerik and captured whole response using both test project and main project. They are identical as far as I can tell. Test project response starts as: HTTP/1.1 200 OK Content-Type: text/xml;charset=UTF-8 Connection: keep-alive Set-Cookie: JSESSIONIDSSO=529DA436282217EF9D8D9F21515121D3; Path=/; Secure Set-Cookie: JSESSIONID=82E5260FE1737AA7C77DCE37D71B7132; Path=/listingapi/ws; Secure Server-Timing: intid;desc=d2369e80a9274e5b Date: Sun, 06 Jun 2021 19:41:44 GMT Vary: Accept-Encoding Content-Length: 15213 <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> <env:Body> <ns1:getSalesByDateRangeResponse xmlns:ns1='http://sale.individual.ws.listingapi.gg.com'> <return> <ackCode>success</ackCode> <responseTime>06/06/2021 22:41:44</responseTime> <timeElapsed>1 ms</timeElapsed> <saleCount>11</saleCount> <sales> <sale> Main project response starts as: HTTP/1.1 200 OK Content-Type: text/xml;charset=UTF-8 Connection: keep-alive Set-Cookie: JSESSIONIDSSO=7A2E4B6940B5E0E44F86FF95BBCD6C3D; Path=/; Secure Set-Cookie: JSESSIONID=0ED54949FAC10990F8F24B27B9174216; Path=/listingapi/ws; Secure Server-Timing: intid;desc=1a968daea7e9c9d9 Date: Sun, 06 Jun 2021 19:41:17 GMT Vary: Accept-Encoding Content-Length: 9877 <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header/> <env:Body> <ns1:getSalesByDateRangeResponse xmlns:ns1='http://sale.individual.ws.listingapi.gg.com'> <return> <ackCode>success</ackCode> <responseTime>06/06/2021 22:41:17</responseTime> <timeElapsed>225 ms</timeElapsed> <saleCount>7</saleCount> <sales> <sale> Web service WSDL can be reached from: https://dev.gittigidiyor.com:8443/listingapi/ws/IndividualSaleService?wsdl I appreciate any help, please. Thanks & Regards, Ertan
  7. This is 32Bit client directory for a 64bit installation for FirebirdSQL. It is indeed 32bit application. No mistake here. BTW, if you check the error message in my second post above, it is trying to load a DLL file in another directory (which is EXE directory) and saying file does not exists. Indeed there is no such file with EXE file and I am trying to figure an INI parameter to provide location of that file. If I copy just fbclient.dll file from C:\Program Files\Firebird\Firebird_2_5\WOW64 next to EXE and it works just fine.
  8. This is FirebirdSQL 2.5.9. File I am putting in INI file is FirebirdSQL installation directory. I suppose anything necessary would be present there. Moreover, there is no problem for other applications to use that identical client DLL file. I think this can be eliminated from possible reasons in my specific case.
  9. This is not helping in my case. I get below error which indicates a completely different dll filename First chance exception at $775DA8B2. Exception class EFOpenError with message 'Cannot open file "C:\dlp\MARS\Demos\EKON22\bin\fbclient.dll". The system cannot find the file specified'. Process EKON22ServerApplication.exe (13632) That directory mentioned in above error is the EXE directory itself. My INI file has lines in my initial post. INI file stays in the same directory as EXE and have same filename with EXE. The MARS Engine is started using below lines. My MARS code base is latest available from GitHub. procedure TMainForm.FormCreate(Sender: TObject); begin FEngine := TMARSEngine.Create(); try FEngine.Parameters.LoadFromIniFile; FEngine.AddApplication('DefaultApp', '/default', ['Server.*']); PortNumberEdit.Text := IntToStr(FEngine.Port); TMARSFireDAC.LoadConnectionDefs(FEngine.Parameters, 'FireDAC'); StartServerAction.Execute; RenderEngines(MainTreeView); except FreeAndNil(FEngine); raise; end; end; If I am missing something, let me know, please.
  10. Hello, I am trying to provide client library for FirebirdSQL database connection for a MARS-Server project. I tried a few different INI parameters, all failed including second line below FireDAC.MAIN_DB.DriverID=FB FireDAC.MAIN_DB.VendorLib="C:\Program Files\Firebird\Firebird_2_5\WOW64\fbclient.dll" FireDAC.MAIN_DB.Database=C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB I wonder what I should be using to be able to use a fbclient.dll in another directory than the EXE file. Thanks & Regards, Ertan
  11. ertank

    Internet time sync - with some timeout

    Thank you to all. My request to have access to problematic computer will not be possible until March 15 due to Covid-19 close down. I will be able to do further analysis after I do have access.
  12. ertank

    Internet time sync - with some timeout

    I just read it. Thanks for sharing. It seems similar. But, in this thread, code continues and not hangs like in my case. If I had same problem, thread would terminate without clock being synced. My problem is thread not terminating. One additional information I should share is that procedure is threaded using ITask like below. uses System.Threading, uUtils.Log; procedure TForm2.FormCreate(Sender: TObject); var Task: ITask; begin Log('Creating thread'); Task := TTask.Create(SetSystemTime); Task.Start(); Log('Thread started'); end; procedure TForm2.IdSNTP1Connected(Sender: TObject); begin Log('SNTP Connected'); end; procedure TForm2.IdSNTP1Disconnected(Sender: TObject); begin Log('SNTP Disconnected'); end; procedure TForm2.IdSNTP1Status(ASender: TObject; const AStatus: TIdStatus; const AStatusText: string); begin Log('SNTP status: ' + AStatusText); end; procedure TForm2.SetSystemTime(); var Sntp: TIdSNTP; begin Log('SetSystemTime(): System clock sync starting'); Sntp := TIdSNTP.Create(nil); try Sntp.OnConnected := IdSNTP1Connected; Sntp.OnDisconnected := IdSNTP1Disconnected; Sntp.OnStatus := IdSNTP1Status; Sntp.Host := 'pool.ntp.org'; Sntp.ReceiveTimeout := 2000; try Log('SetSystemTime(): Running actual time sync...'); Sntp.SyncTime(); Log('SetSystemTime(): System clock sync completed'); except on E: Exception do begin Log('SetSystemTime(): ' + E.Message); end; end; finally Sntp.Free(); end; Log('SetSystemTime(): Done'); end; That code sample is from a project that I am preparing with detailed logging to help identifying the problem. That code running on my system produces with following lines: 2021-01-20 14:56:58.949 Creating thread 2021-01-20 14:56:58.952 Thread started 2021-01-20 14:56:58.953 SetSystemTime(): System clock sync starting 2021-01-20 14:56:58.953 SetSystemTime(): Running actual time sync... 2021-01-20 14:56:59.067 SetSystemTime(): System clock sync completed 2021-01-20 14:56:59.068 SetSystemTime(): Done As you can see, there is no connection or disconnection here. Problem might be privilege but, this should not hang whole thread and should just exit from it. BTW, I just learned (by chance talking to a colleague) that problem occurs only on Windows 10 OSes and not on Windows 7 or Windows XP.
  13. ertank

    Internet time sync - with some timeout

    I forgot to mention in my initial post that I have already tried to change ReceiveTimeout to 2000 with no success. Sorry about that. Since ReceiveTimeout did not work that makes me believe there is a kind of a problem like privilege or initial connection. I do not know though. I cannot access to computers in that location for better understanding.
  14. Hello, I have following code running in a thread when application starts. procedure TMainForm.SetSystemTime(); var Sntp: TIdSNTP; begin Sntp := TIdSNTP.Create(nil); try Sntp.Host := 'pool.ntp.org'; try Sntp.SyncTime(); except // eat exception, we are in thread end; finally Sntp.Free(); end; end; When there is no internet connection, thread above code runs is never terminated. I could not find some connection timeout setting for IdSNTP. Is there any other way to terminate Sntp.SyncTime() if it is not completed for a certain period of time like 10 seconds. There is a location with a corporate firewall (with some weird settings I believe) where check for an internet connection is true, but above code still hangs. Thanks & Regards, Ertan
  15. ertank

    Deploying certificate with your Android app

    I did add private key certificate as a resource as I tried to explain in my initial post. I did deploy my security config "network_security_config.xml" under "res\xml" in project Deployment. Sorry, forgot to mention that in detail. BTW, I am not trying to deploy my app in Play Store. Just trying to deploy it with my self signed HTTPS certificate.