Jump to content

Search the Community

Showing results for tags 'mormot'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 3 results

  1. Two blog posts to share: https://blog.synopse.info/?post/2021/02/13/Fastest-AES-PRNG%2C-AES-CTR-and-AES-GCM-Delphi-implementation https://blog.synopse.info/?post/2021/02/12/New-AesNiHash-for-mORMot-2 TL&DR: new AES assembly code burst AES-CTR AES-GCM AES-PRNG and AES-HASH implementation, especially on x86_64, for mORMot 2. It outperforms OpenSSL for AES-CTR and AES-PRNG, and is magnitude times faster than every other Delphi library I know about.
  2. Regards, I'm searching how to create an HTTP POST request, but I can't manage to do it. This is a SOAP Service that I can consume using the ?wsdl (now is hidden); but some nice provider write this: POST https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc?wsdl HTTP/1.1 Content-type: text/xml;charset="utf-8" Accept: text/xml SOAPAction: http://tempuri.org/IConsultaCFDIService/Consulta cache-control: no-cache Host: consultaqr.facturaelectronica.sat.gob.mx accept-encoding: gzip, deflate content-length: 414 Connection: close <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"> <soapenv:Header/> <soapenv:Body> <tem:Consulta> <!--Optional:--> <tem:expresionImpresa><![CDATA[?re=LSO1306189R5&rr=GACJ940911ASA&tt=4999.99&id=e7df3047-f8de-425d-b469-37abe5b4dabb]]></tem:expresionImpresa> </tem:Consulta> </soapenv:Body> </soapenv:Envelope> I try something like this, using Indy; but the web is a dark box for me in Delphi. // I'm trying using the REST clients, the Indy Http, ... uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Xml.xmldom, Xml.XMLIntf, Vcl.ComCtrls, Xml.Win.msxmldom, Xml.XMLDoc ,Vcl.StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, Xml.omnixmldom, IPPeerClient, REST.Client, Data.Bind.Components, Data.Bind.ObjectScope, IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL; ... uses IdMultipartFormData; ... procedure TForm3.Button3Click(Sender: TObject); var data: TIdMultiPartFormDataStream; begin data := TIdMultiPartFormDataStream.Create; try // add the used parameters for the script data.AddFormField('expresionImpresa', '?re=LAN8507268IA&rr=LAN7008173R5&tt=5800.00&id=4e87d1d7-a7d0-465f-a771-1dd216f63c1a'); // Call the Post method of TIdHTTP and read the result into TMemo Memo1.Lines.Text := IdHTTP1.Post('https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc', data); //ERROR //HTTP/1.1 415 Cannot process the message because the content type 'multipart/form-data; boundary=--------111018174150958' //was not the expected type 'text/xml; charset=utf-8'. //--------------------------- finally data.Free; end; end; procedure TForm3.Button2Click(Sender: TObject); var S: TStringList; M: TStream; begin S := TStringList.Create; M := TMemoryStream.Create; try S.Values['expresionImpresa'] := '?re=LAN8507268IA&rr=LAN7008173R5&tt=5800.00&id=4e87d1d7-a7d0-465f-a771-1dd216f63c1a'; //'![CDATA[?re=LAN8507268IA&rr=LAN7008173R5&tt=5800.00&id=4e87d1d7-a7d0-465f-a771-1dd216f63c1a]]'; IdHTTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL1; //IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded'; IdHTTP1.Post('https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc', S, M); Memo1.Lines.Add(Format('Response Code: %d', [IdHTTP1.ResponseCode])); Memo1.Lines.Add(Format('Response Text: %s', [IdHTTP1.ResponseText])); // ERROR: //HTTP/1.1 415 Cannot process the message because the content type //'application/x-www-form-urlencoded' was not the expected type 'text/xml; charset=utf-8'. //--------------------------- M.Position := 0; S.LoadFromStream(M); Memo1.Lines.AddStrings(S); finally S.Free; M.Free; end; end; Consuming the web services is a lot easier, just I need to Import the WSDL (is hidden right now but I still manage to get before), create the unit and start using the service, the consume is just: procedure TwsConsultaCFDIEmpresa.doConsulta (const representacionI : string); var ics : IConsultaCFDIService; vAcuse : Acuse2; begin try ics := GetIConsultaCFDIService(false); // representacionI is something like: // ?re=LAN8507268IA&rr=LAN7008173R5&tt=5800.00&id=4e87d1d7-a7d0-465f-a771-1dd216f63c1a vAcuse:= ics.Consulta(representacionI); finally with vAcuse do ShowMessage(CodigoEstatus +'/ '+EsCancelable +'/ '+ Estado +'/ '+EstatusCancelacion); end; end; I need to read some basic documentation, but alas, I don't know how to start. Maybe with a working example can I go forward. I don't know if using the "REST clients" are something that I need. Edit: Using Firefox I got an extension named "Httprequester" but I can't make a successful request/POST. Thanks in advance
  3. Arnaud Bouchez

    mORMot running on Delphi 10.3 Rio

    Now that Delphi 10.3 Rio is out, we had to ensure that our little mORMot would run with this revision. Since we don't make any commercial software with Delphi any more (we switched to FPC), I downloaded the Community Edition. We disabled the Error Insight feature, which seems not very stable especially with our mORMot complex units - as with previous Delphi versions. In respect to the previous "Starter" editions, this CE version includes everything you expect for good work: Win32 + Win64 + OSX + mobile compilers, and even the source code of the RTL and enabled command-line compilers! The IDE seems really refreshed with its new layout. You feel at home and with some modern and fresh air! Great work Embarcadero! Of course, the "Pro" and "Architect" features are missing (like FireDAC, DataSnap or RADServer). But mORMot is self-contained even for the database access, so with the CE you can write full-features REST/SOA client-servers and MVC web applications, with a simple ORM and high-performance OleDB/ODBC database access to SQlite3, MSSQL, Oracle, Firebird, MySQL and others (by-passing the TDataSet class for better performance) and even NoSQL like MongoDB. Ensure you follow the Embarcadero license terms when you use mORMot with the Community Edition. With Rio, the main breaking change was that the PCRE API switched from an UTF-8 to UTF-16, and did hide the UTF-8 function calls. But after a small patch, now everything works as expected - at least for our regression tests. See http://blog.synopse.info/post/2018/11/24/mORMot-running-on-Delphi-10.3-Rio