Skip to main content
Level 3
Feb 26, 2018 5:17 PM UTC
Solved

Read a xml file from file system and store as jcr:data in crx

Hi,

In AEM, how to read a xml file from file system and store the content as jcr:data into sling:folder node using Java?

Any sample or tutorial available, kindly help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Mar 1, 2018 7:20 PM UTC

Here is the HELPX article that was created based on this thread -- Scott's Digital Community: Creating a Custom Watched Folder Service for Adobe Experience Manager 6.3

22 replies

smacdonald2008
Level 10
Mar 1, 2018 12:28 AM UTC

We will have a HELPX artilce that shows this end to end in a few days!

Translate
smacdonald2008
Level 10
Mar 1, 2018 12:51 AM UTC

My AEM Scheduler Service is grabbing the XML file from the Watched Folder every min and putting it into the JCR Repo--

Translate
Level 3
Mar 1, 2018 2:37 AM UTC

Thanks smacdonald2008 .

Is this based on AEM workbench process?

Also we need to store the xml file in sling:folder (not nt:folder) as jcr:data (binary), as this is the expected format by the prefill osgi service that we have deployed already. This xml will be read in adaptive form through prefill service

Translate
smacdonald2008
Level 10
Mar 1, 2018 2:39 AM UTC

Its an AEM OSGi service written in Java.. Then anothet AEM scheduler service invokes the custom service that reads the XML file and places it within the JCR.

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Mar 1, 2018 7:20 PM UTC

Here is the HELPX article that was created based on this thread -- Scott's Digital Community: Creating a Custom Watched Folder Service for Adobe Experience Manager 6.3

Translate
Level 3
Mar 2, 2018 5:38 PM UTC

Thanks smacdonald2008​.

Looking forward to this on Monday.

Translate
smacdonald2008
Level 10
Mar 2, 2018 5:40 PM UTC

We are wrapping up this today - it works very nicely as a custom AEM Service with an AEM Scheduler Service -- all discussed in the new article.

Translate
Level 3
Mar 6, 2018 12:31 PM UTC

hi smacdonald2008

The article is still not available. kindly let know when it will it be available

Translate
smacdonald2008
Level 10
Mar 6, 2018 1:42 PM UTC

The article is live and the URL is posted.

Translate
Level 3
Mar 7, 2018 4:24 PM UTC

Thanks smacdonald2008 i tried to install the bundle. Getting below error, any idea what could be wrong?

Translate