Introduction
[AEM Forms as a Cloud Service]{class="badge informative"}
In this course, we will use the document generation microservices to generate a pdf by merging data with a XDP template. To use these microservices from an external application involves the following steps:
- Generate service credentials for an AEM technical account
- Create a JSON Web Token (JWT) from the service credentials and exchange the same for an access token
- Configure access for the technical account in AEM
- Make HTTP calls using the access token
Transcript
Hi, in this course we will learn to use AEM Forms Cloud Service, Document Generation Microservices. These Microservices can be invoked from a non AEM system using most of the common programming languages. In this example, I have a simple eclipse project with a main.java file. Included in this project are some sample data files, a template and a credential file. So this credential file you’ll have to update its content with the credentials, which are specific to your AEM Forms instance. When I execute the main.java file, a SGDP post call will be made to an end point exposed by the AEM Forms Cloud Service instance. The end point will merge the data files with the template to generate PDFs, the generated PDFs will be shared, will be stored on the file system of the calling application. So let’s run this main.java. Here I’m going to run it as a Java Application, and it’s writing out some debug statements here. And once the documents are generated, I should get a message here saying done generating two files. The generated documents are stored on my file system and they are stored in this folder here. These are the two files that were generated. And if I were to open one of these files, you should see the data being merged with the template here. So give it a minute. This is the data that was merged from the file that was provided to you as part of the eclipse project. So this is how simple it is to consume and invoke the Microservices exposed by the AEM Forms Cloud Service instance. -
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69