DESIGN AND DEVELOPMENT OF A WEB SERVICE FOR GENERATING AND SENDING PDF DOCUMENTS
Abstract
The design and development of a web service for automatic generation, email distribution and verification of PDF certificates or other PDF documents are considered in the work. This web service can work independently or in integration with other software products. The task of generating a PDF document is implemented using the iText library, which allows you to create files in various ways. In this project, PDF files are generated based on HTML templates, which allows you to easily create documents with different markup and different design. GMail’s SMPT server is used to send e-mails. Letters are created using the JavaMailSender library. There are two ways to verify the authenticity of a PDF certificate. You can follow the link on the certificate. If information about such a document is available in the database, the name of the event and the name of the participant will be displayed. If there is no information in the database, information about this will be displayed. Another way is to enter the code from the document into a special field on the web page. The software product is developed in the form of a web service that implements the REST approach. The project is implemented in the Java programming language using the Spring family of frameworks: Spring Boot, Spring Data JPA, Spring Web, Spring Security. The project implements the Controller-Service-Repository design pattern and consists of the corresponding levels. At the entity level, entities from the database are described in the form of objects. That is, a class is created for each of the tables in the database, the fields of which correspond to the attributes of the table. At the repository level, requests to the database using the JpaRepository interface are described. The logic of the web service is implemented at the service level. A separate service class or several classes are written to perform each of the tasks, if the task is large and it is advisable to divide it into subtasks. REST controllers are responsible for the external interface. A separate access address (endpoint) will be created for each of the actions that the user or other application can perform. Main actions: creating an event, receiving a list of events, deleting events, adding information about an event participant, receiving a list of participants, generating certificates, sending certificates, authenticating users, checking the presence of a certificate by a unique code. The web service has a simple user interface in the form of a web page where you can check the certificate for authenticity. For the work of administrators, a cabinet was created using the Swagger library.
References
2. Bülthoff, Frederik, and Maria Maleshkova. RESTful or RESTless–current state of today’s top web APIs. In The Semantic Web: ESWC 2014 Satellite Events: ESWC 2014 Satellite Events, Anissaras, Crete, Greece, May 25-29, 2014, Revised Selected Papers 11, P. 64–74.
3. Зінченко А. Ю. Проектування розподілених інформаційних систем на основі використання технології слабозв’язаних компонентів. Системи та технології, 1(63), 2022. С. 5–14. https://doi.org/10.32782/2521-6643-2022.1-63.1
4. Fielding, Roy Thomas. Architectural styles and the design of network-based software architectures. University of California, Irvine, 2000.
5. Neumann, Andy, Nuno Laranjeiro, and Jorge Bernardino. An analysis of public REST web service APIs. IEEE Transactions on Services Computing 14, No. 4, 2018, P. 957–970.
6. Chen, Yixiong, Yang Yang, Zhanyao Lei, Mingyuan Xia, and Zhengwei Qi. Bootstrapping automated testing for RESTful web services. Fundamental Approaches to Software Engineering: 24th International Conference, FASE 2021, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2021, Luxembourg City, Luxembourg, March 27 – April 1, 2021, Proceedings 24, pp. 46–66. Springer International Publishing, 2021.
7. Massaga, Aristide, and Georges Edouard Kouamou. Towards a Framework for Evaluating Technologies for Implementing Microservices Architectures. Journal of Software Engineering and Applications 14, No. 8, 2021, P. 442–453.
8. Коломієць О. Е. Проєктування та розроблення сервісної архітектури управління бізнес-процесами університету. Генерація PDF документів засобами системи : кваліфікаційна робота на здобуття ступеня вищої освіти «магістр». Херсонський держ. ун-т. Херсон : ХДУ, 2021. 54 с.
9. Lowagie, Bruno. IText in Action. Simon and Schuster, 2010.
10. Bluck, Alan S. PDF Document Creation Using Java. In IBM Software Systems Integration: With IBM MQ Series for JMS, IBM FileNet Case Manager, and IBM Business Automation Workflow, p. 991-1269. Berkeley, CA: Apress, 2023. https://doi.org/10.1007/978-1-4842-8861-0_6
11. Provos, Niels, and David Mazieres. Bcrypt algorithm. USENIX. 1999.
12. Fowler, Martin. Patterns of Enterprise Application Architecture: Pattern Enterpr Applica Arch. Addison- Wesley, 2012.
13. Walls, Craig. Spring in action. Simon and Schuster, 2022.
14. Dos Santos, Jéssica Soares, Leonardo Guerreiro Azevedo, Elton FS Soares, Raphael Melo Thiago, and Viviane Torres da Silva. Analysis of Tools for REST Contract Specification in Swagger/OpenAPI. ICEIS (2), 2020. P. 201–208.
15. Miell, Ian, and Aidan Sayers. Docker in practice. Simon and Schuster, 2019.