Hello everyone,
I have found the solution to my problem. I might not have explained it well. Up till today I can't exactly use the body as parameter or extract it using a java call. The Rest Service from the app store maps the attributes perfectly to a non-persistable entity (See post from Mike Kumpf).
My second problem was to get the JSON depths mapped correctly as well, so I can use the data for validation and saving them into a persistable entity. After some testing this is what I've come up with and it works perfectly (see img).
See the JSON post in the body (postman) and the entity's I've created to map it on. In the microflow itself I have the parameter 'Entity' as object and because of the association 'car' it will also map the second entity (wwaa) perfectly because the association has the same name as the list object 'car'.
I'd like to thank everyone for helping and thinking with me! This is the solution for me :)
Gr. Jermaine
Hi Jermaine,
Have you tried the Java action deserializeObjectToJSON that is included in the REST module? It sounds like that is what you might be looking for.
Jermaine,
I got curious about this and, looking around at blog posts and Github, found this in the documentation - and thought it might help you out:
The blog post mentioned in this documentation can be reached here: https://www.mendix.com/blog/rest-part-ii-publishing-microflows-rest/ and contains the following domain model with an entity that would be populated with information sent with the request - including JSON elements:
Hopefully some of this information will help you get pointed to a solution that works for you.
Mike
You also have another alternative which is make use of the REST functionality within the Mendix platform. Its very easy to extract the body of the response > see response handling in the Call Rest action (import maping/store in string etc.).