How to bind XML data in Adaptive Form Page? | Community
Skip to main content
New Participant
June 10, 2021
Solved

How to bind XML data in Adaptive Form Page?

  • June 10, 2021
  • 3 replies
  • 1691 views

Hi All,

 

The Form are created using AEM Adaptive Form and applied the bind reference with xml schema. The requirement is, have to create a OSGI REST service that should accept form name & xml data with reference to field binding and should return the Adaptive Form page URL with xml data binding. 

Could you please suggest how to bind the xml data to Adaptive Form page and return in service?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by user97597

@ramachandra_pokala - In your Submit section you can have pass XML to the workflow (REST) & you can read the same XML data in workflow.

3 replies

Mayank_Gandhi
Employee
June 17, 2021

@ramachandra_pokala That's exactly what XSD will help you with. Take a dummy data and convert to xsd(bunch of free tools available). Bind form with XSD and as the data will come it will be filled based on binding. Or use form data model, it supports both soap and REST.

 

https://experienceleague.adobe.com/docs/experience-manager-learn/forms/adaptive-forms/prefill-service-adaptive-forms-article-use.html?lang=en#:~:text=To%20prefill%20adaptive%20form%20using,consume%20to%20prepopulate%20the%20fields.

Mayank_Gandhi
Employee
June 17, 2021

@ramachandra_pokala  You can go to form properties and bind the form the xsd. To get data from the form and send it to a service, call the below method and send the received response to your service. 

https://helpx.adobe.com/experience-manager/6-3/forms/javascript-api/GuideBridge.html 

 

guideBridge.getData({ success : function (guideResultObject) { console.log("data received" + guideResultObject.data); } error : function (guideResultObject) { console.error("API Failed"); var msg = guideResultObject.getNextMessage(); while (msg != null) { console.error(msg.message); msg = guideResultObject.getNextMessage(); } } });

- Mayank Gandhi

New Participant
June 17, 2021
Hi @mayank_gandhi, thank you for the reply.
user97597Accepted solution
New Participant
June 14, 2021

@ramachandra_pokala - In your Submit section you can have pass XML to the workflow (REST) & you can read the same XML data in workflow.