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

Sample | Submit Adaptive form to rest endpoint

Mayank_Gandhi
Community Advisor
Community Advisor

Do you know you can submit adaptive form data and attachment to third party rest endpoint?

 

https://experienceleague.adobe.com/docs/experience-manager-64/forms/adaptive-forms-basic-authoring/c...

 

Here is a simple rest controller using Spring that you can use to test and merge with your java code:

 

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/employee")
public class EmployeeController {


@RequestMapping(method = RequestMethod.POST, consumes = { "multipart/form-data" }, value = "/getData")
@ResponseBody
public void myUser(@RequestPart("jcr:data") String data ) {
System.out.println(data);
}

@GetMapping(path = "/sample")
public String myUser2() {
return "sample get";


}

}

 

0 Replies