Outsystems web app provides public REST web service, internally the web service consumes a external web service that process the actual request and provides a response, this external web service uses dynamic fields.
Example
{
"somefield":"somevalue",
"anotherfield":"anothervalue",
"yetanotherfield":"yetanothervalue"
}
Most elements are unknown. (some elements are known and first parsed before sending the data off to the external web service).
Consumer web app --send JSON request----> Outsystems REST web service ----sends JSON request---> external web service.
How do you get outsystems Expose REST to handle dynamic fields efficently?
One solution I found to work (but not very efficent solution) is to create a MetaData structure record list with a structure record containing two attribute field "Name" and "Value". Expose this as a REST web service, then read from the reqest and convert the MetaData list to a dynamic JSON content send that to the external web service to process the request. This works but it is a not an efficent solution! Is there a better way to handle this?
Example
{
"somefield":"somevalue",
"anotherfield":"anothervalue",
"yetanotherfield":"yetanothervalue"
}
Most elements are unknown. (some elements are known and first parsed before sending the data off to the external web service).
Consumer web app --send JSON request----> Outsystems REST web service ----sends JSON request---> external web service.
How do you get outsystems Expose REST to handle dynamic fields efficently?
One solution I found to work (but not very efficent solution) is to create a MetaData structure record list with a structure record containing two attribute field "Name" and "Value". Expose this as a REST web service, then read from the reqest and convert the MetaData list to a dynamic JSON content send that to the external web service to process the request. This works but it is a not an efficent solution! Is there a better way to handle this?