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
BedrockMission!

Learn More

View all

Sign in to view all badges

Sample | Submit Adaptive form to rest endpoint

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

270 likes

Total Posts

1,101 posts

Correct Reply

180 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

270 likes

Total Posts

1,101 posts

Correct Reply

180 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

07-02-2021

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";


}

}