Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Who Me Too'd this topic

Avatar

Employee

If the FormsService.renderPDFForm("crx:///content/xyz.xdp",...) is called with an xdp stored within the repository (using the crx://.... path), the FormsService retrieves that xdp from the repository using a ResourceResolver inherited from the context of the current request. This works fine, if we are in a servlet request context.

But if the call takes place in a different context, i.e. some arbitrary service (in my case a sling health check service), there is no ResourceResolver. This leads to the error   AEM_FRM_001_006:resourceResolver is Null which occures within the com.adobe.forms.aem.impl.RepositoryServiceImpl.

Other rendering services like the OutputService.generatePdfOutput(...) can be called not only by a string parameter to define a path of an xdp but also by a Document object containing the xdp. This allows the repository access to happen outside the rendering service and so the ResourceResolver can be handled under control of the calling programm.

The FormsService.renderPdfForm does not offer such a variant. Also it does not offer any possibility to hand in a ResourceResolver (at least as far I can see). 

Is there a possibility to somehow put an ResourceResolver into the FormsService?

Or is there a possibility to avoid the need of an ResourceResolver (but still be able to use xdp's stored within the repository)?

Aa allways, any help is appreciated 🙂

Regards

Alex

Who Me Too'd this topic